-
-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
goto: use current window; respect / use 'switchbuf' setting in general #408
Comments
Yes, I want to be able to undo the changes.
I'm not even sure where all of that stuff comes from. Most things have not been added by me, but by people that wanted a certain behavior. I therefore don't know how I feel about changing all of that.
Don't understand that question. Sorry :) I'm now trying to play with switchbuf, however I haven't really been able to make use of it properly. I |
I see. I will try to not change it dramatically, but e.g. nobody really wants a new window or tab when going to a definition. You can easily go back with btw: tabs are meant to organize windows, not buffers.. :) But I can see where you're coming from.
It's not used / respected yet. |
This add `jedi_vim.edit_buffer`, factored out of `new_buffer`, and `goto` uses it. Ref: davidhalter#408
This add `jedi_vim.edit_buffer`, factored out of `new_buffer`, and `goto` uses it. Ref: davidhalter#408
I don't want that (for my VIM) :-) I agree with you that we should probably make the buffer option
I know that that's VIM's idea. But I feel different about this. I like tabs :-) I personally never want any buffers open if they are not tabs. I always close open buffers (that are not tabs) with I have played around with |
Done in #430. |
This adds `jedi_vim.edit_buffer`, factored out of `new_buffer`, and `goto` uses it. Ref: davidhalter#408
I still don't get why you would want that "goto" opens a new tab or (and that's more irritating) jumps to some existing tab (where multiple windows might be opened). The PR #409 changes this to use I think we should get #430 merged, and then see how #409 fits your/this workflow. |
Because it's how every major IDE works. And of course because I like it :) |
Therefore I would not like to use |
👍 for respecting It still seems that nmap <buffer> <silent> <Leader>d :tab split<CR> :call jedi#goto()<CR> Create a new split or tab and Vim keeps the cursor where it was in the previous window, so you can immediately call (I would really like to rework how this plugin handles mapping configuration too, but that's a bit off-topic here…). |
@davidhalter Note that There may still be a lot of cases where Vim will open "duplicate" tabs though, well beyond the scope of jedi-vim—as you concede, one-to-one tab-to-buffer mapping just isn't Vim's natural model 😄 I wouldn't want your own plugin to start to feel alien for your workflow, but it does seem like some redundant config options and special-case code could be eliminated if native features in the right combinations can meet everyone's wishes. |
You're welcome to mention them! (in a different thread). :)
This actually sounds interesting and I haven't tried that yet. I tried using #409 with |
Sure, once I find some time for it it'd be good if that thread came with a pull request I think :-) |
Hi all, just a gentle reminder on this one. |
@lkhphuc |
I find it irritating, when "goto" goes to another/existing window (in another tab), via
_newtab
.I think that jedi-vim should use Vim's
switchbuf
setting in general:Using
switchbuf
could eliminate some of the settings (g:jedi#use_tabs_not_buffers
andg:jedi#use_splits_not_buffers
), or rather could derive their defaults from it (g:jedi#use_splits_not_buffers
allows for providingleft
,right
etc.)I find
jedi#use_tabs_not_buffers
(enabled by default) an odd setting by itself: e.g. for the quickfix list for the usages, there should be no extra handling, just use the standard quickfix mechanisms (which usesswitchbuf
).Apart from that,
goto
should just use the window where it was called from, at least by default.Some concrete questions:
:Pyimport
should behave like "goto", i.e. not open a new buffer by default (according toswitchbuf
)?The text was updated successfully, but these errors were encountered: