http://blog.verycd.com/yoyopub/showentry=22855
http://adrianhuang.blogspot.com/2007/09/trace-code-gvimctagscscope.html
http://blog.chhsu.org/2009/03/multi-projects-of-vim-using-cscope.html
- Install Ctags
- Install Cscope
- Make Sure Your Vim Support Cscope
- Download Cscope Plugin
$cd ~/.vim/plugin
$ wget http://cscope.sourceforge.net/cscope_maps.vim
- Install Taglist
Download tagliast from http://vim-taglist.sourceforge.net/download.html.
Follow the installation steps from http://vim-taglist.sourceforge.net/installation.html
Add the following line into your .vimrc will help you to open taglist and switch between tag and editor window.
filetype on
nnoremap < silent > < f2 > :TlistToggle < cr >
nnoremap < silent > < f3 > :wincmd p < cr >
- Generate DB & test
#!/bin/bash
CSCOPE_FILE=cscope.out
if [ -n "$1" ]; then
echo "Source code directory: " $1
echo "Create file map : " $CSCOPE_FILE
find $1 -name "*.h" -o -name "*.c" -o -name "*.cpp" > $CSCOPE_FILE
cscope -bkq -i $CSCOPE_FILE
# cscope -Rbkq
ctags -R
else
echo "Please key-in path of project"
fi
$cd source-code
$cscope
- Other IDEs