1. Download the latest vim version and build it as follows steps:
./configure --prefix=/home/tools //安裝目錄
--enable-perlinterp //perl整合
--enable-pythoninterp //python整合
--enable-cscope //csope支援
--enable-multibyte //雙位元組支援,一次可以跳過一個漢字
--enable-fontset
--with-features=huge //最大特性
make
make install
2. taglist support
download taglist plugin (taglist_45.zip)
refer to:
http://easwy.com/blog/archives/advanced-vim-skills-taglist-plugin/
http://blog.chinaunix.net/u/15620/showart_174219.html
3. cscope support
download cscope-15.7.tar.bz2
./configure && make && make install
refer to:
http://lab.gracecode.com/manual/cscope_vim_tutorial_zh.html
http://cscope.sourceforge.net/large_projects.html
http://easwy.com/blog/archives/advanced-vim-skills-cscope/
4. cscope.files generation for linux kernel
#! /bin/sh
LNX=$PWD
cd /
find $LNX /
-path "$LNX/arch/*" ! -path "$LNX/arch/arm*" -prune -o /
-path "$LNX/include/asm-*" ! -path "$LNX/include/asm-arm*" -prune -o /
-path "$LNX/tmp*" -prune -o
/
-path "$LNX/Documentation*" -prune -o
/
-path "$LNX/scripts*" -prune -o
/
-path "$LNX/drivers*" -prune -o
/
-name "*.[chxsS]" -print > $LNX/cscope.files
Now, I don't use above shell script, just use following commands:
KBUILD_SRC=$PWD make cscope ARCH=arm
Linux kernel supports to build cscope files.
5. set CSCOPE_DB variable
modify ~/.bashrc:
CSCOPE_DB=/home/lanttor/Git/linux-2.6/cscope.out
export CSCOPE_DB
This step can be done manually ( I do: export CSCOPE_DB=xxx in the console for flexibility)
6. download cscope_maps.vim from
http://lab.gracecode.com/manual/cscope_vim_tutorial_zh.html
copy it to ~/.vim/plugin/ directory