-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Independent stacks for each vim window when using GoDef #1431
Comments
Thanks for your detailed report! I'm not sure what should happen if you open I'm not sure how people are using this feature, and if changing the stack to be window-local would break other people's workflow. Could add a setting, I suppose, but meh; it's the sort of thing that should ideally work well out of the box for everyone. Comments and insights welcome! |
I'm not sure I understand your workflow. Could you elaborate on your use of I'm used to the cscope and ctags way of doing things so that seems the most natural to me and vim-go breaks that flow. Doesn't everybody feel the same way? ;) |
In my
So when I press Currently the global I think this is okay, since I don't expect that many people who use tabs like this use the DefStack (as it's kind of the same), but I'm not 100% sure, as I don't know how people are using Vim... You can never be sure as one man's bugfix can be another man's bug ;-) |
Now that we have this feature, I"m really thinking to get rid of it. There is already a native stack, and it's called It's all native and integrated into Vim. I don't think it's worth spending time here, because it's just not worth implementing something which is already there and integrated into Vim. We should just remove this feature and announce it. |
I'm good with that. So does this mean instead of using |
Is It seems all that we really need is the use of vim's tags stack used by tagsrch similar to what's used when working with C code (ctags or cscope) and the common Perhaps using a ctags compatible go tag generator such as https://github.com/jstemmer/gotags would work, but I'd prefer to have it all integrated into this awesome plugin. |
Behavior
When using the
go to definition
:GoDef
feature to navigate the source code with multiple vim windows open, each window will operate on the same:GoDefStack
. This means that if you navigated to one area of the code in one window, all the other windows opened in the same vim process will see the sameGoDef
stack and subsequently push and pop on the same stack. This becomes a bit confusing as you move back and forth between windows pushing and popping as needed.Steps to reproduce:
There are all sorts of combinations of this behavior that are cumbersome but here is a trivial example to reproduce it using version 1.14:
GoDef
in.GoDef
e.g. function, type, etc. and execute:GoDef
or your equivalent hot-key.:GoDefStack
and observe how you're using the same stack as the first window.:GoDefPop
or your equivalent hot-key and observe how you'll go back to the spot that you previously ran:GoDef
from in the first window. This is confusing because you never navigated anywhere in this window.:GoDefPop
or your equivalent hot-key. Observe how you don't go anywhere because you've already popped in the other window. So you're sort of stuck without a trail back home. :( Now you have to:GoDefStack
to try and figure out where you started from to get back home in this window.While in this trivial example it's not too big a deal, as the levels of the stack grow and you fork to new areas of the code, this begins to get really hairy. Instead, the
GoDef
feature would be greatly enhanced if we had independent stacks for each vim window.Configuration
The text was updated successfully, but these errors were encountered: