Simple configuration of ubuntu VIM + ctags + cs.pdf

Source: Internet
Author: User
Tags svn update

There are a lot of plug-ins on the Internet about how to configure, use VIM + ctags + csloud for code viewing and editing tools, I write mainly at the entry level, with the help of various scripts, you can quickly build a better development environment.

Steps:

1. Install complete Vim. There is no vim-full version in the source of 10.04. Install Vim directly;

$ Sudo apt-Get install Vim

 

2. Install a Vim plug-in circulating on the network:
$ Mkdir ~ /. Vim_runtime
$ SVN Co SVN: // orangoo.com/vim ~ /. Vim_runtime
$ Cat ~ /. Vim_runtime/install. Sh
$ Sh ~ /. Vim_runtime/install. Sh Linux

You can also upgrade the plug-in:
$ SVN update ~ /. Vim_runtime

 

After installing the above two steps, VIM has been quite easy to use. There are a lot of scripts in it, and you need to explore it slowly if you are familiar with it.

The next step is to make Vim a helper tool that is as convenient as source insight for viewing code.

 

3. Install ctags

Sudo apt-Get install ctags

This tool is easy to use. It can be directly used in the source code Directory: ctags-R to generate the tags script file and complete some simple code indexes, but the function is not powerful enough.

 

4. Install the taglist script

: Http://www.vim.org/scripts/script.php? Script_id = 1, 273

After downloading, directly overwrite the extracted Doc and plugin folders "~ /. Vim_runtime "directory, re-enter Vim to automatically load this script. Its main function is to list all functions, global variables, macros, and other information in the file in the vim window. You can use Ctrl + W to switch between two windows.

 

5. Install cssag

$ Sudo apt-Get install cscope

After the installation is complete, download a script for setting the shortcut: http://cscope.sourceforge.net/cscope_maps.vim

In this way, you can use the shortcut key to complete the search function variable definition, function call, and many other index functions.

Note: cssag only indexes the C code by default. If you want to add an index for multiple types of code, you need to use other methods. refer to the following link:

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

 

Finally, the website provides several Vim resources:

Http://easwy.com/blog/

Www.vimer.cn

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.