http://blog.linux.org.tw/~jserv/archives/001608.html
http://cscope.sourceforge.net/cscope_vim_tutorial.html
http://cscope.sourceforge.net/cscope_maps.vim
Install ctags and cscope first.
Put cscope_maps.vim into .vim/plugin/.
In the dir you want to trace,
$ ctags -R && cscope -R
It will generate ctags and cscope.out, then you can do following command in vi.
ctags:
Ctrl+] : find the tag definition
Ctrl+t : go back
cscope:
Ctrl+\, s :
find all references to the token under cursor
Ctrl+\, c :
[Note] To trace java code:
$ find . -name '*.java' > cscope.files
$ cscope -b
No comments:
Post a Comment