-
Notifications
You must be signed in to change notification settings - Fork 100
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
Stack/history for TernDef #83
Comments
The Emacs and Sublime Text plugins have this feature. If vim itself has a tag stack, it'd indeed be great if we integrate with that. I unfortunately know very little about vim scripting. Do you maybe want to take a stab at an implementation? |
I am not familiar with vim scripting either :( I did a bit of searching on the internet, and there are apparently two lists maintained by vim: a Tag Stack and a Jump List. The latter works well with the Tern plugin, one can use I am proposing to improve the documentation and mention that |
Link to relevant Vim's docs: :help jump-motions |
A quick look over the docs does not show any way to push something onto the tagstack without actually using the tag functionality to jump somewhere. Since the vim docs are not the cleanest docs around, that does not necessarily mean that there is no such functionality. If someone knows a way, a pull request would be very welcome. |
I just stumbled upon this issue and have to say that jump lists work well for me with |
Meanwhile work happens to provide a solution to this problem, I use this work-around: # file: .vim/ftplugin/javascript.vim
noremap <buffer> <silent><c-]> :<C-u> TagImposterAnticipateJump <Bar> :TernDef<CR> It is powered by idbrii/vim-tagimposter which was made for this very purpose, given the need has risen since LSP plugins become more popular. Its description says:
Hope it helps |
As a ViM user used to the behaviour of the builtin tags commands (
:tag Ctrl-]
,:pop Ctrl-T
), where I can easily return back to previous location after jump to a tag definition, I am missing this feature in Tern.In an ideal world, Tern would either integrate with built-in tag stack. If that's not possible, then it should at least provide an equivalent of
:pop
command, e.g.TernDefBack
.See also :help tagstack
The text was updated successfully, but these errors were encountered: