Step 1:
CP/USR/SHARE/VIM/VIMRC ~/.VIMRC
First copy the Vim configuration template to the personal directory
Step 2:
VI ~/.VIMRC
Enter insert mode, add two lines at the end
Syntax on
Set nu!
Save the call.
Finally, attach other options (from the Internet)
Set nocompatible "Remove the relevant VI consistency pattern to avoid bugs and limitations in previous versions
Set nu! The Display line number
Set GUIFONT=LUXI/MONO/9 "Setting font, font name and font size
filetype on "Detecting file types
Set history=1000 "Record the number of rows in history
Set Background=dark "Background using black
Syntax on "Syntax high brightness display
Set Autoindent "Vim uses automatic alignment, that is, applies the alignment format of the current line to the next line (auto indent)
Set Cindent "(Cindent is automatically indented for C language syntax)
Set Smartindent "according to the above alignment format, intelligent selection alignment, for similar C language writing useful
Set tabstop=4 "Sets the TAB key to 4 spaces,
Set shiftwidth = 4 "Sets the use of 4 spaces when interlaced between rows
Set ai! The Set auto indent
Set Showmatch "Sets the matching pattern, similar to when an opening parenthesis is entered, matches the appropriate closing parenthesis
Set guioptions-=t "Removal of vim in GUI version toolbar
Set VB t_vb= "When Vim is being edited, an alert is issued if the command is wrong, and the setting removes the alarm
Set ruler "Displays the status line of the cursor position in the lower-right corner during the editing process
Set Nohls "By default, look for a match is a high brightness display, this setting turns off highlighting
Set Incsearch "Query a word in the program, automatically match the position of the word, such as query desk word, when you lose to D, will automatically find the first d word, when input to/de, will automatically find the first word to start with DS, and so on, into When you find a word to match, don't forget to enter
Set backspace=2 "Setting backspace key available
Vim always displays line number, open syntax highlighting in Mac/linux