Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relative paths in tag file

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?

like image 590
Jeenu Avatar asked Oct 14 '25 15:10

Jeenu


1 Answers

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.

like image 68
pokey Avatar answered Oct 18 '25 04:10

pokey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!