Search code examples
vimctagsexuberant-ctags

How to get ctags working inside vim


I'm new to vim and wanted to get ctags integration working so I can more easily navigate a large java project.

I've pulled down the zip from source forge and extracted it but from here I'm not sure how to get it working with vim

Any help for a novice vim user would be great!


Solution

  • This is what I'm doing:

    1. ctags -n -f [OUTPUT] [SOURCE] to generate the tags (NOTE: the -n applies to me but may not be necessary for your usage)
    2. exec "set tags=" . [OUTPUT] inside of .vimrc to let vim become of aware of the tags

    EDIT: I'm using

    • Exuberant Ctags 5.5.2
    • VIM 6.1

    Additional info:

    • See ctags usages here
    • Tips and tricks from SO