Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim and ctags: tag filenames

Tags:

vim

ctags

Is it possible to have ctags generate tags for filenames as well? I would like to be able to jump to a file given a filename. :find seems to be awfully slow compare to tags...

like image 927
Andy Avatar asked Jun 14 '11 18:06

Andy


1 Answers

Try running ctags -R --extra=f .

The --extra=f option tells ctags to:

"Include an entry for the base file name of every source file (e.g. "example.c"), which addresses the first line of the file."

When you open vim, you can the use :tag <filename> to jump to the first line of the file.

like image 51
Tim Henigan Avatar answered Oct 23 '22 12:10

Tim Henigan