Configuration of Vim in CentOS

Source: Internet
Author: User

I. Introduction to VIM

Multi-mode editor, visual operation can not only run at the terminal, but also can run on X window, Mac OS, Windows.

1, the basic concept of VIM

Basically vim can be divided into three states (in fact, there are many models, the current master of these 3 can be), respectively, command mode, insert mode and the bottom line mode, the function of each mode is differentiated as follows:

1) command-line mode

Controls the movement of the screen cursor, the deletion of characters, words, or lines, moving and copying a section and entering insert mode, or to last line mode

2) insert mode

Only in the Insert mode, you can do text input, press "esc" to return to the command line mode.

3) Bottom line mode

Save or exit Vim, or set up an editing environment, such as searching for a string, listing line numbers ... such as

Second, the configuration of vim

Under directory/etc/, there is a file named VIMRC, which is a public vim configuration file in the system and is valid for all users. In each user's home directory, you can create a private configuration file, named: ". VIMRC". For example, under the/root directory, a. vimrc file is usually already present.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/80/71/wKiom1dBpkeQ1cC8AACELBty-5s139.png "title=" capture. PNG "alt=" Wkiom1dbpkeq1cc8aacelbty-5s139.png "/>

1, put a link, unzip and put in the. VIMRC inside, and then completed some common page configuration

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

2, install TagList plug-in

http://www.vim.org/scripts/script.php?script_id=273

Download Taglist_xx.zip, unzip the finished, will extract the contents of the doc to ~/.vim/doc, will extract the contents of plugin under the copy to ~/.vim/plugin

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/80/6F/wKioL1dBqnGhQN1OAAA6Ty7AL_A525.png "title=" Capture 1. PNG "alt=" Wkiol1dbqnghqn1oaaa6ty7al_a525.png "/>

3, add in ~/.VIMRC:

Let tlist_show_one_file=1

Let Tlist_exit_onlywindow=1

Let Tlist_use_right_window=1

4, install File Browser and window Manager--plugin: Winmanager

Http://www.vim.org/scripts/script.php?script_id=95

Download the winmanager.zip,2.x version above.

Decompression Winmanager.zip, will extract the contents of the doc to ~/.vim/doc, the extracted plugin under the contents of the copy to ~/.vim/plugin

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/71/wKiom1dBqefB9IPTAAAsLtXQW0c281.png "style=" float: none; "Title=" Captures 2. PNG "alt=" Wkiom1dbqefb9iptaaasltxqw0c281.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/6F/wKioL1dBqtiiSeEiAABFlgL7u9M415.png "style=" float: none; "Title=" Captures 4. PNG "alt=" Wkiol1dbqtiiseeiaabflgl7u9m415.png "/>

5, add in ~/.VIMRC:

Let g:winmanagerwindowlayout= ' fileexplorer| TagList '

Nmap wm:wmtoggle<cr>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/80/6F/wKioL1dBq2bxwAi4AAAZEqfRhY8041.png "title=" Capture 5. PNG "alt=" Wkiol1dbq2bxwai4aaazeqfrhy8041.png "/>

6, then restart Vim, open ~/xxx.c or ~/xxx.cpp, enter "WM" in normal state and you will see the effect.

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/6F/wKioL1dBq7nhpbC-AAE0KrdAgkI970.png "title=" Capture 6. PNG "alt=" Wkiol1dbq7nhpbc-aae0krdagki970.png "/>

Here, the basic configuration of vim is complete.

This article is from the "stand out or Get out" blog, so be sure to keep this source http://jiazhenzhen.blog.51cto.com/10781724/1775974

Configuration of Vim in CentOS

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.