4

I'm facing a problem to use an absolute path on Vim 'tags' option under Windows XP.

Directory hierarchy:

C:/ | Temp/ | | tags | test.cpp 

Commands below on vim while editing test.cpp

:pw C:\ :set tags? tags=./tags,tags,'C:/Temp/tags','C:\Temp\tags' :echo tagfiles() [] :echo findfile('tags', 'C:/Temp') Temp\tags 

So, despite the tag file can be found using findfile(), tag information aren't available to :tag or :ptag commands, and it is not found by tagfiles().

What am I missing here?

Note: I'd like to avoid using relative path and wildcards, as I'm working with a project with multi-level directory hierarchy with a single tag file, and using wildcards would be too slow.

1 Answer 1

2

Try :set tags=./tags,tags,c:/Temp/tags.

I think the problem comes from how you wrote the path to tags, quoted.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks! This solved the problem! Just curious... any idea of why removing these quotes changed the behavior?
Because that's how you are supposed to write paths in your configuration file wether you are on some UNIX variant or Windows. I suppose the goal is to make vimrc files portable. BTW, thanks to Luc Hermitte for fixing my typo.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.