1.sudo apt-get install vim-full cscope ctags
2.download cscope_map.vim taglist.vim and put it to .vim/plugin
3.use below script to generate cscope.files
LNX=/home/darcy/linux-2.6.30
cd /
find $LNX \
-path "$LNX/arch/*" ! -path "$LNX/arch/mips/*" -prune -o \
-path "$LNX/include/asm-*" ! -path "$LNX/include/asm-mips/*" -prune -o \
-path "$LNX/crypto/" -prune -o \
-path "$LNX/firmware/" -prune -o \
-path "$LNX/scripts/" -prune -o \
-path "$LNX/security/" -prune -o \
-path "$LNX/samples/" -prune -o \
-path "$LNX/sound/" -prune -o \
-path "$LNX/usr/" -prune -o \
-path "$LNX/tmp/" -prune -o \
-path "$LNX/Documentation" -prune -o \
-path "$LNX/scripts/" -prune -o \
-path "$LNX/drivers/" ! -path "$LNX/drivers/net/*" -prune -o \
-name "*.[chxsS]" -print >$LNX/cscope.files
4.cd /home/darcy/cscope && cscope -b -q -k
5.cd /home/darcy/linux-2.6.30 && ctags -R
6.cd /home/darcy/cscope && cscope -d
referrence:
1)The Vim/Cscope tutorial
2)Using Cscope on large projects (example: the Linux kernel)
阅读(2552) | 评论(1) | 转发(0) |