On 2009-09-28, Torsten Andre wrote:
> Hello,
> 
> I have a problem setting my tags path to a specific file. The tags file
> is stored within a directory I need to search for different other
> settings. Since I already know, where the tags file is to located, I'd
> like to set the tags path to the file when loading a file, so VIM
> doesn't have to search the tags file again.
> 
> That's what I have in my .vimrc (the : are just to label vimrc lines
> from my comments):
> 
> :let path_to_tags_folder = "~/bla/blub/"
> :let tags_file = path . "tags"
> 
> Now I'd like to set the tags path accordingly:
> 
> :set tags=tags_file
> 
> But within vim, executing ":set paths", it shows "tags=tags_file". How
> can I get vim to interpret tags_file as a variable and not as a string?

There are two ways to do this:

    let &tags = tags_file

    exe 'set tags=' . tags_file

See

    :help let-&
    :help exe

Regards,
Gary



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to