~/.ctags
ctags --recurse=yes --exclude=.git
generate tags for vim
- cadd config at ~/
$ cat ~/.tags
--recurse=yes
--exclude=.git
--exclude=BUILD
--exclude=.svn
--exclude=*.js
--exclude=vendor/*
--exclude=node_modules/*
--exclude=db/*
--exclude=log/*
--exclude=\*.min.\*
--exclude=\*.swp
--exclude=\*.bak
--exclude=\*.pyc
--exclude=\*.class
--exclude=\*.sln
--exclude=\*.csproj
--exclude=\*.csproj.user
--exclude=\*.cache
--exclude=\*.dll
--exclude=\*.pdb
- generate
$ cd ~/ws/proj/
$ ctags
# ctags --recurse=yes --exclude=.git
- start navigate tag
$ vim -t <main>
- list all tags
:tags
- jump to current
<tag>
definitionctrl + ]
- jump back to prev tag
ctrl + T
- select tag
:ts <tag>
- jump to next match
:tn
- jump to previou match
:tp
- jump directly
:tag main
, jump to main directly:tag /^get
, jump to lable match^get
, i.e. start with ‘get’