Location of the configuration file
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.
1. Switch your login name su XXX Enter the password can be
2. Set syntax highlighting
Syntax on
3. Display line Numbers
Set Nu
4. Set the number of spaces in the indent to 4
Set shiftwidth=4
5. Installing the TagList Plugin
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 the plugin under the copy to ~/.vim/plugin
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/80/6F/wKioL1dBqnGhQN1OAAA6Ty7AL_A525.png "alt=" Wkiol1dbqnghqn1oaaa6ty7al_a525.png "/>
7. Add in ~/.VIMRC:
Let tlist_show_one_file=1
Let Tlist_exit_onlywindow=1
Let Tlist_use_right_window=1
6. Install the 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.
Unzip the Winmanager.zip, put the extracted doc content to ~/.vim/doc, will extract out
Copy of the content under the plugin to ~/.vim/plugin
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/71/wKiom1dBqefB9IPTAAAsLtXQW0c281.png "alt=" Wkiom1dbqefb9iptaaasltxqw0c281.png "/>
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/6F/wKioL1dBqtiiSeEiAABFlgL7u9M415.png "alt=" Wkiol1dbqtiiseeiaabflgl7u9m415.png "/>
7. Add in ~/.VIMRC:
Let g:winmanagerwindowlayout= ' fileexplorer| TagList '
Nmap wm:wmtoggle<cr>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/80/EB/wKiom1dEbkXx2r8-AAB6kZMQkWo218.png "title=" 7k0vi51%pdu1t]v@9j6hmi3.png "alt=" Wkiom1debkxx2r8-aab6kzmqkwo218.png "/>
8. Then restart Vim, open ~/xxx.c or ~/xxx.cpp, enter "WM" in normal state, you will
See the effect.
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/80/E9/wKioL1dEbT_Tg5LrAABwT_1lnkg447.png "title=" (j_ 77sk["}x_somgi3{c}r.png" alt= "Wkiol1debt_tg5lraabwt_1lnkg447.png"/>
Configuration of Vim in Linux