Saturday, April 30, 2011

Re: set tags # look for TAGS in current folder and up?

> When browsing through source I want tag file TAGS to be searched for
> in the folder of the current file and then up the parent folders.
>
> On my first try it seems this is not working:
>
> set tags=./TAGS,../TAGS,../../TAGS,../../../TAGS,../../../../TAGS
>
> Any ideas?

My guess is that it's probably looking relative to the current
directory, not the current file, and you want the latter. You could use

:set tags=./TAGS,./../TAGS,./../../TAGS

The explicit ./ should make it relative to the file, not the current
directory.

But, it is probably better to try

:set tags=./TAGS;

This uses an upward search which apparently works for the 'tags' option
(:help file-searching).

It is important that 'd' is not in cpoptions. Check this with

:set cpo?

And use

:set cpo-=d

if you need to fix it.

See :help 'tags' for a little more info and cross-references.

Ben.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: