Use VIM + cscope to build a programming environment

Source: Internet
Author: User

1. download the latest Vim version and build it as follows steps:

./Configure -- prefix =/home/tools // installation directory
-- Enable-perlinterp // Perl Integration
-- Enable-pythoninterp // Python Integration
-- Enable-CSPE // csope support
-- Enable-multibyte // double-byte support, one Chinese character can be skipped at a time
-- Enable-fontset
-- With-features = huge // maximum features

Make
Make install

2. taglist support
Download taglist plugin (taglist_45.zip)
Refer:

Http://easwy.com/blog/archives/advanced-vim-skills-taglist-plugin/

Http://blog.chinaunix.net/u/15620/showart_174219.html

3. cssag support
Download cscope-15.7.tar.bz2
./Configure & make install

Refer:

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/CSX. Files

Now, I don't use abve shell script, just use following commands:
Kbuild_src = $ PWD make cs1_arch = arm

Linux Kernel supports to build csprogram 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 ~ /. Vim/plugin/directory

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.