On 2007-03-07, Zarko Coklin <[EMAIL PROTECTED]> wrote: > Hi all! > > I am trying to automate my Vim setup as much as > possible. On my PC I have 2 directories for 2 > different releases. > > C:\Code_Rel1 > C:\Code_Rel2 > > At a very top level in each of these directories I > have ctags files. How can I setup Vim so that it > sources right ctags file depending from I started Vim. > For example, if I go under Code_Rel1 and in Windows > use right click to open file in one of subdirectories, > ctags should be picked up from C:\Code_Rel1 and not > from C:\Code_Rel2. > > Hard coding path to ctags in .vimrc is not an option, > cause it will not work well if I right-click to open > file from another release directory. > > Any thoughts on how this can be achieved?
If you don't mind adding a command to your .vimrc for each ctags file, you could do this: au BufRead,BufNewFile C:/Code_Rel1/* set tags=C:/Code_Rel1/tags au BufRead,BufNewFile C:/Code_Rel2/* set tags=C:/Code_Rel2/tags HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Mobile Broadband Division | Spokane, Washington, USA