Reputation: 2231
If a tags file contains relative paths, Vim attempts to locate the source file relative to the location where the tag file itself lies, not from the current directory. I.e. the tag file must lie where ctags -R
was run from.
Any way to get Vim to locate the source file from the PWD, in case I want to keep the same tag file elsewhere?
Upvotes: 4
Views: 2358
Reputation: 108
Add set notagrelative
to your .vimrc file. Quoting from here:
'tagrelative' - Controls how the file names in the tags file are treated. When on, the filenames are relative to the directory where the tags file is present.
Upvotes: 8
Reputation: 3596
you can use :set tags=/path/to/your/tagfiles
to load tags files from any directory.
Upvotes: 0