after installing the Vim editor on a Linux system, it was found that Vim's page settings were not used, no line numbers were displayed, no automatic indentation, and the background of the page was not very nice, but the Vim editor was configurable and we could create our own vim style. The following is a brief discussion of the simple vim configuration problem:
1. Simple Page Setup (attached)
First, use the CD/ETC command to enter the ETC directory, and then enter the Vim VIMRC into the vim configuration file to view the following:
650) this.width=650; "title=" Untitled. png "alt=" Wkiom1dgyxvslztbaacrfjmsqdw325.png "src=" http://s2.51cto.com/wyfs02/M00 /81/f6/wkiom1dgyxvslztbaacrfjmsqdw325.png "/>
You can add the configuration information later, generally add at the end of the file, as far as possible to add comments to facilitate viewing. Here are some common configuration information that readers can add in their own configuration files:
(1) Display line number set Nu
650) this.width=650; "title=" 3.png "alt=" Wkiom1dfdtkxqvdpaaa3cwl4rjy688.png "src=" http://s4.51cto.com/wyfs02/M00/ 80/ef/wkiom1dfdtkxqvdpaaa3cwl4rjy688.png "/>
(2) Set auto indent set AI (auto indent) set Si (smart indent)
650) this.width=650; "title=" 3.png "alt=" Wkiol1dfey2g-qmlaaaeyg_zccy184.png "src=" http://s3.51cto.com/wyfs02/M01/ 80/ed/wkiol1dfey2g-qmlaaaeyg_zccy184.png "/>
(3) Set-C + + indent sets Cindent
650) this.width=650; "title=" 3.png "alt=" Wkiom1dfet3ag9nsaaaezelzcry646.png "src=" http://s1.51cto.com/wyfs02/M02/ 80/ef/wkiom1dfet3ag9nsaaaezelzcry646.png "/>
(4) Set Tab = 4
650) this.width=650; "title=" 3.png "alt=" Wkiol1dfe7mcu72aaaakprp7pva631.png "src=" http://s5.51cto.com/wyfs02/M02/ 80/ed/wkiol1dfe7mcu72aaaakprp7pva631.png "/>
:
650) this.width=650; "title=" 3.png "alt=" Wkiol1dfe3hqkdqzaaaf4o6luca649.png "src=" http://s1.51cto.com/wyfs02/M02/ 80/ed/wkiol1dfe3hqkdqzaaaf4o6luca649.png "/>
(5) Setting the background color
Set Background=dark
ColorScheme Torte
650) this.width=650; "title=" Untitled. png "alt=" Wkiom1dgystb0zcyaaajkbo8bvs604.png "src=" http://s3.51cto.com/wyfs02/M02 /81/f6/wkiom1dgystb0zcyaaajkbo8bvs604.png "/>
--Some of the following configuration instructions do not show up one by one, you need to experiment with yourself:
Syntax on "syntax highlighting
filetype on "Detecting file types
Set Nocompatible "Don't vim imitate VI mode
Set Hlsearch "input string to display matching points
Set Wildmenu "Auto-complete command when using menu-matching list
Set Nohls "Query is very convenient, can quickly find the answer
Set Nobackup "Remove the edit hint
Set history = "Number of historical operations for Vim Records"
Set IgnoreCase "Ignore case when searching"
The above command is too many, not particularly complete, want to make their vim more convenient, you can go to the following connection to download a. VIMRC compressed file, and then copy the extracted files to their working directory, as shown in:
Links: Http://files.cnblogs.com/ma6174/vimrc.zip
650) this.width=650; "title=" Untitled. png "alt=" Wkiom1dgecbjnfuvaabxefgvaeg494.png "src=" http://s1.51cto.com/wyfs02/M01 /81/f8/wkiom1dgecbjnfuvaabxefgvaeg494.png "/>
2. Installing the TagList Plugin
Links: http://www.vim.org/scripts/script.php?script_id=273
after entering, download the compressed file of taglist, put the extracted doc file in the. vimrc file, and put the plugin extracted files in plugin.
3. Installing the Winmanager Plugin
Links: http://www.vim.org/scripts/script.php?script_id=95
after entering, download the compressed file of taglist, put the extracted doc file in the. vimrc file, and put the plugin extracted files in plugin.
--Here are the specific illustrations:
650) this.width=650; "Width=" 841 "height=" 387 "title=" 1.png "style=" WIDTH:694PX;HEIGHT:387PX; "src="/HTTP/ S1.51cto.com/wyfs02/m01/82/02/wkiol1dht-faqvrjaaejdkhsfve355.png "alt=" Wkiol1dht-faqvrjaaejdkhsfve355.png "/>
4. Open the. vimrc file and enter the following
650) this.width=650; "title=" 1.png "src=" Http://s5.51cto.com/wyfs02/M02/82/02/wKioL1dHuK7jJl32AAAulYDMuTw277.png " alt= "Wkiol1dhuk7jjl32aaaulydmutw277.png"/>
5. Open the. C or. cpp file and enter "WM" directly in the normal state
Open the. c file, press ESC to enter the normal state, enter the "WM" directly (it is important to note that the following interface is not entered at the command line: WM):
650) this.width=650; "title=" 1.png "src=" Http://s5.51cto.com/wyfs02/M00/82/04/wKiom1dHuY6y6KaXAADRipEggOA276.png " alt= "Wkiom1dhuy6y6kaxaadripeggoa276.png"/>
Note: You can change the background color of the Vim editor in edit Profile Perferences.
This article is from the "unintentional persistent" blog, please be sure to keep this source http://10740590.blog.51cto.com/10730590/1783767
How powerful is the ' vim configuration ' in CentOS?