Build a VIM development environment

Source: Internet
Author: User
Recently I switched to another project for Ksh and Perl Development. However, I used Eclipse before and it was a little difficult to switch to Vi. I searched the internet and found some Vim enhanced plug-ins to implement the file structure List. the Code automatically completes the function. Although it cannot catch up with Eclipse and Netbeans, it can also improve development efficiency in a certain program. My installation is divided into the following

Recently I switched to another project for Ksh and Perl Development. However, I used Eclipse before and it was a little difficult to switch to Vi. I searched the internet and found some Vim enhanced plug-ins to implement the file structure List. the Code automatically completes the function. Although it cannot catch up with Eclipse and Netbeans, it can also improve development efficiency in a certain program.

My installation involves the following three steps:

1. install Vim.

2. install Ctags + Taglist.

3. install bash-support.

1. install Vim.

: Http://www.vim.org/download.php.

I downloaded Vim7.3 and Windows. Because the Server environment is Aix, I cannot install software at will. Therefore, the development environment is built locally. after the development is complete, the code is uploaded to the Server for running and testing.

The installation of VimWindows is very simple, and there is nothing special to note. Note that Vi is used in many Unix * environments. many documents, including installation and configuration documents, refer to the configuration file $ VIM_HOME/. vimrc. In Windows, this file is called $ VIM_HOME/_ vimrc.

2. install Ctags + Taglist.
These two are the classic partners of Vim, mainly implementing the file structure List and locating function. Similar to the Outline view function in Eclipse. And they are relatively General functions, whether it is Shell Development, C, java, and Python, they support.

A) install Ctags.

Here, Ctags refer to Exuberant Ctags, GNU Ctags, and Unix CtagsUtility.

Ctags are provided in some Unix * systems. If no package installation tool such as apt-get or yum is available.

I downloaded the Windows binary.pdf at http://ctags.sourceforge.net. Download the package and decompress it to a directory without installation.

B) install Taglist.

The Vim plug-in for Taglist can be downloaded at http://vim-taglist.sourceforge.net/index.html.

Before installation, you need to do two things,

A). Taglist requires Vim's System () function. in some Vim versions, System () is not compiled. Open Vim and run the following command,

: Echo exists ('* system') to check whether it is installed. If 1 is returned, it indicates that it has been installed. Windows has been installed.

B). Taglist depends on the filetyp detection mechanism of Vim, so open it. Add a row in $ VIM_HOME/_ vimrc,

Filetype on.

For Linux, the configuration file is $ VIM_HOME/. vimrc.

Installation steps:

A)decompress taglist.zip, copy taglist. vim to $ VIM_HOME/vim73/plugin/, and copy taglist.txt to $ VIM_HOME/vim73/doc.

B) open Vim and enter the command helptags to load the help file of Taglist. Without this step, you will not be able to see help.

C) Modify $ VIM_HOME/_ vimrc and add letTlist_Ctags_Cmd = "D: \ app \ Vim \ ctags58 \ ctags.exe"

D) restart Vim and enter the command TlistToggle or Tlist to open the plug-in.

For the Taglist shortcut key or help, enter the command: help taglist, or press F1 in the Taglist plug-in.

3. install bash-support.

Bash-support plug-ins can be in http://www.vim.org/scripts/script.php? Script_id = 365 download.

After downloading and decompressing the files, you will see folders and files such as bash-support, doc, and ftplugin. copy them together to the $ VIM_HOME/vimfiles/Folder. in this way, when you open Vim, bash-support is automatically loaded. At this time, you will see a new 'bash 'menu item. here you can select the code block to be automatically generated. I only use the Comments and control statement templates.

Bash-support can automatically generate file header comments, such as Author, Company, and Date. This template is stored in the $ VIM_HOME/vimfiles/bash-support/templates/folder, you can modify the template file to customize it. If you are interested, open these template files and take a look.

Supplement the environment construction in Ubuntu:

1. the installation of Vim is the same as that of Ctags.

2. the Taglist plug-in should be placed in the. vim directory under the user's main directory, and. vimrc is also in the user's main directory. If not, create a new one. Note: put the decompressed doc and plugin directory under the. vim directory.

3. after the Bash-support tool is decompressed, it is stored in the. vim Directory. Note that the directory of doc and plugin is also used.

4. Similarly, do not forget to load the help document, ": helptags .".


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.