Pacific-Design.com

    
Home Index

1. Vim

2. CTags

+ Select Files

+ taglist

Vim / CTags /

Exuberant Ctags

Installation of CTags

apt-get install exuberant-ctags
yum install exuberant-ctags

Ctags Commands

Ctrl-] ............. Go to definition
Ctrl-T ............. Jump back from the definition.
Ctrl-W Ctrl-] ...... Open the definition in a horizontal split
Ctrl-\ ............. Open the definition in a new tab
Ctrl-V ............. Open the definition in a vertical split


vim -t myfunction from the shell
         \_ open the file where "myfunction" lives

Edit .vimrc for new commands

map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>

Create Perl Files for CTags
    find . -name *.pl -o -name *.pm | tee flist 
    ctags -L flist

OR Generate Ctags for directory1/ directory2/
function mytags() {
     ctags -f tags --recurse directory1/ directory2/ \
--exclude=.svn \
--languages=Perl }

Set CTags to Vim editor

# vi ./vimrc
set tags=/home/kevin/tags

# Starts in looking in current directory for "tags", and work up the tree towards root until one is found. 
set tags=./tags;/