Normally you would use just one tags
file located in the root directory of your project.
For example, to tag the whole of Vim's own source code, located in ~/src/vim-7.3
, you navigate to that directory and generate the tags file there.
$ cd ~/src/vim-7.3
$ ctags -R
That's all.
You can do the same from inside Vim, of course. Start Vim and then type:
:cd ~/src/vim-7.3
:!ctags -R
Check that you have the correct 'tags'
setting. Default is ./tags,tags
, meaning Vim will look for a tags
file in the current directory.
Make sure to read :h 'tags'
in its entirety. You can instruct Vim to look for tags
files deep in the directory tree by giving patterns containing wildcards.
One more thing: For this approach to work, Vim's current working directory must remain at the root at all times. If you have some option like 'autochdir'
set or constantly switch directories yourself, then the tags
obviously won't be found.