使用vim+cscope组合,搭建编程环境

 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值