FANDOM


m (No review needed)
(link to ctags; remove junk)
Line 16: Line 16:
 
</pre>
 
</pre>
   
This assumes Exuberant Ctags. The -R (or --recurse) option tells ctags to recurse into directories.
+
This assumes [http://ctags.sourceforge.net/ Exuberant Ctags]. The -R (or --recurse) option tells ctags to recurse into directories.
   
 
Then, set the tags option in [[vimrc]] as:
 
Then, set the tags option in [[vimrc]] as:
Line 32: Line 32:
 
==Comments==
 
==Comments==
 
You can also tag help/man files, and access it from Vim with commands like these in vimrc:
 
You can also tag help/man files, and access it from Vim with commands like these in vimrc:
 
 
<pre>
 
<pre>
 
au FileType perl set tags^=$DOC/perl/tags
 
au FileType perl set tags^=$DOC/perl/tags
Line 39: Line 38:
   
 
----
 
----
 
== Headline text ==
 

Revision as of 23:47, April 7, 2009

Tip 804 Printable Monobook Previous Next

created October 12, 2004 · complexity intermediate · author Dubhead · version 6.0


At the top of a source tree, create a tags file by

% ctags -R

This assumes Exuberant Ctags. The -R (or --recurse) option tells ctags to recurse into directories.

Then, set the tags option in vimrc as:

set tags=tags;

The last semicolon is the key here. When Vim tries to locate the 'tags' file, it first looks at the current directory, then the parent directory, then the parent of the parent, and so on.

This setting works nicely with 'set autochdir'. You need +path-extra feature for this tip.

References

Comments

You can also tag help/man files, and access it from Vim with commands like these in vimrc:

au FileType perl set tags^=$DOC/perl/tags
au FileType cpp set tags^=$DOC/cpp/tags

Community content is available under CC-BY-SA unless otherwise noted.