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