tags:

views:

118

answers:

1

I just want to transfer from SourceInsight to VIM. I know the basic of VIM, also study some pop plugins (project, fuzzlefind, taglist), but I still have a few questions about my main scenario.

I worked on a huge source tree. It's too huge, that I can't create tag for each sub folder, or add them all to the project, and in fact I don't care about most of the folders in the tree. I just need to work on a few sub trees. On these trees, I would like to:

  1. navigate with tags;
  2. open file by using the file name;
  3. grep among the folders in my project, or only in one sub-folder;
  4. update tag when a file is updated.

I have used SourceInsight for a few years, and need to do these work everyday. If I want to switch to VIM, I must ensure I can do the same thing.

Thanks,

+1  A: 

what you need is cscope,which can create database with those files specified by you. You need to tell cscope which files you want to build tags with. This link may help: cscope_vim

But cscope+vim cannot update tags automatically; you need to update yourself or get it done with some shell script.

Tristan Su
I like to use key mappings to run a shell command which retags the current project files. For example, nmap TR :!cscope -o %-p. That could be used to update tag for current file when you press TR
Sam Post
>>>update tag when a file is updated. If the source code is updated very frequently, could re-built the database each time Vim starts. But it might be slow, depending on the size of your source code.
Tristan Su