Vim configuration in the CentOS environment (with image)

Source: Internet
Author: User

When you start programming in Linux, Vim is not configured to be programmed with only the initial edits, which is a lot more inconvenient than programming in the Windows environment.


650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/81/FC/wKiom1dGrHuAIEBKAAFNB3F5XvA911.jpg "title=" Qq20160526155309.jpg "alt=" Wkiom1dgrhuaiebkaafnb3f5xva911.jpg "/>


Then, after the vim is configured, this inconvenience can be largely mitigated.

After querying the relevant documentation, a relatively best-case scenario is selected:

Configuration conditions

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/81/FB/wKioL1dGrojBUJmIAAGW2FTcoX4648.jpg "title=" Qq20160526160052.jpg "alt=" Wkiol1dgrojbujmiaagw2ftcox4648.jpg "/>

Next, the most important: Configure Vim


1. Download the zip file under the root directory (open target directory, download in directory)

wget Http://files.cnblogs.com/ma6174/vimrc.zip

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/81/FC/wKioL1dGtz2jS-G7AAJjK5h3wWY742.jpg "title=" Qq20160526163920.jpg "alt=" Wkiol1dgtz2js-g7aajjk5h3wwy742.jpg "/>

Extract files to/root directory

Unzip Vimrc.zip


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/81/FD/wKioL1dGxv_DqsRBAADxhtc4gnQ357.jpg "title=" Qq20160526174638.jpg "alt=" Wkiol1dgxv_dqsrbaadxhtc4gnq357.jpg "/>


2. Installing TagList

Create a new directory. Vim (the name must be. Vim because originally my newly created file named Vim_comfig results in the final failure to achieve the desired effect < Sometimes there is this directory, readers can use this name as .vim>), enter the directory

Enter command, download

wget http://www.vim.org/scripts/download_script.php?src_id=19574

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/81/FE/wKioL1dG8oeifP-BAACXPXEq2Ds400.jpg-wh_500x0-wm_3 -wmp_4-s_1024025273.jpg "title=" qq20160526205221.jpg "alt=" Wkiol1dg8oeifp-baacxpxeq2ds400.jpg-wh_50 "/>

Since the file after download is not. zip format, but still able to decompress

Unzip download_script.php?src_id=19574

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/81/FF/wKioL1dG9E_xfW9wAABCtBWsjn4410.jpg-wh_500x0-wm_3 -wmp_4-s_3430758125.jpg "title=" qq20160526205957.jpg "alt=" Wkiol1dg9e_xfw9waabctbwsjn4410.jpg-wh_50 "/>

Deleting a compressed package

RM download_script.php?src_id=19574


3. Add the following four instructions in the. VIMRC

Let tlist_show_one_file=1

Let Tlist_exit_onlywindow=1

Let Tlist_use_right_window=1

Let tlist_ctags_cmd= '/uer/local/bin/ctags '

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/82/00/wKioL1dHFxHTJPkiAABGj4biNbc272.jpg-wh_500x0-wm_3 -wmp_4-s_3661102951.jpg "title=" qq20160526232235.jpg "alt=" Wkiol1dhfxhtjpkiaabgj4binbc272.jpg-wh_50 "/>


4. Install the File Browser and window Manager plugin: Winmanager

Open the second step directory (. vim_config)

Download Winmanager Compression Pack

wget http://www.vim.org/scripts/download_script.php?src_id=754


650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/82/00/wKiom1dG9e-QCeUJAACeR52Nal8543.jpg-wh_500x0-wm_3 -wmp_4-s_3910186171.jpg "title=" qq20160526211059.jpg "alt=" Wkiom1dg9e-qceujaacer52nal8543.jpg-wh_50 "/>

Unzip the package: the extracted doc content to ~/doc, the extracted plugin under the contents of the copy to ~/plugin

Unzip download_script.php?src_id=754

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/81/FF/wKioL1dG-SuR6-2bAABMeMvYS9I094.jpg-wh_500x0-wm_3 -wmp_4-s_2533392412.jpg "title=" qq20160526212043.jpg "alt=" Wkiol1dg-sur6-2baabmemvys9i094.jpg-wh_50 "/>

Does not display after decompression, but has moved the file operation

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/82/00/wKiom1dG-QfB1z4YAABwlcwyMzM628.jpg-wh_500x0-wm_3 -wmp_4-s_74173441.jpg "title=" qq20160526212409.jpg "alt=" Wkiom1dg-qfb1z4yaabwlcwymzm628.jpg-wh_50 "/>


5. Add a command in. VIMRC:

Let g:winmanagerwindowlayout= ' fileexplorer| TagList '

Nmap wm:wmtoggle<cr>

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/82/00/wKioL1dHGAyQyyxYAABjXEMzGMs932.jpg-wh_500x0-wm_3 -wmp_4-s_1369386529.jpg "title=" qq20160526233214.jpg "alt=" Wkiol1dhgayqyyxyaabjxemzgms932.jpg-wh_50 "/>


6. Open vim to open the. c/.cpp file

Open a file

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/82/01/wKiom1dHFo-RuycoAABpZreSYzE146.jpg-wh_500x0-wm_3 -wmp_4-s_2994552634.jpg "style=" Float:none; "title=" Qq20160526231954.jpg "alt=" Wkiom1dhfo-ruycoaabpzresyze146.jpg-wh_50 "/>

Enter WM command to convert to window

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/82/00/wKioL1dHF4XBW2ZLAACuq-eL7NY428.jpg-wh_500x0-wm_3 -wmp_4-s_1301841373.jpg "title=" qq20160526231826.jpg "style=" Float:none; "alt=" Wkiol1dhf4xbw2zlaacuq-el7ny428.jpg-wh_50 "/>

Success!


Vim configuration in the CentOS environment (with image)

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.