Have VIM jump to a ctag in an existing tab

Posted by Adrian Petrescu on Super User See other posts from Super User or by Adrian Petrescu
Published on 2010-06-13T16:27:05Z Indexed on 2010/06/13 16:33 UTC
Read the original article Hit count: 418

Filed under:
|

I have ctags configured with my vim installation. My habit is to usually have all of the relevant files I'm working on open in tabs in vim all at once. The "problem" is that if I use Ctrl+] to jump to a ctag in a file I'm editing, it will replace the buffer in that tab, even though I have another tab already open containing that symbol. It would be much better if it just switched to that tab and jumped to the symbol there instead. This way I would always have a 1-to-1 tab-to-file ratio.

I noticed in the Changenotes for the taglist.vim plugin (which I also use) has an entry that says

1. Added support for jumping to a tag/file in a new or existing tab 
   from the taglist window (works only with Vim7 and above). 

However, I couldn't find anything in the documentation for Taglist (or Ctags) about how to actually do this.

Can any vim gurus fill me in? Thanks!

© Super User or respective owner

Related posts about vim

Related posts about ctags