Copy the code to the user directory to create a new file for. VIMRC
Save to take effect; If you want all users to take effect please modify/ETC/VIMRC (CP is recommended first)
Set nocompatible "Turn off VI compatibility mode
Syntax on "Automatic syntax highlighting
ColorScheme Molokai "Set color scheme
Set number "Displays line numbers
Set Cursorline "highlight when moving forward
Set ruler "Open the status bar ruler
Set shiftwidth=4 "Settings << and >> command width of 4 when moving
Set Softtabstop=4 "allows you to delete 4 spaces at a time by pressing BACKSPACE
Set tabstop=4 "Set tab length to 4
Set Nobackup "Overwrite file without backup
Set Autochdir "Automatically switches the current directory to the directory where the current file is located
FileType plugin indent on "Open plugin
Set Backupcopy=yes "The behavior when setting up a backup is overwrite
Set ignorecase smartcase "ignores case when searching, but remains case sensitive when one or more uppercase letters are available
Set Nowrapscan "Prohibit re-searching when searching to both ends of a file
Set Incsearch "Search results are displayed when you enter search content
Set Hlsearch "Highlight found text when searching
Set Noerrorbells "Shutdown error message ring
Set Novisualbell "off using visual bells instead of calls
Set t_vb= "Empty error ringtone terminal code
"Set Showmatch" when inserting parentheses, briefly jumps to matching corresponding parentheses
"Set matchtime=2" briefly jumps to the time of matching parentheses
Set Magic
Set hidden "allows the buffer to be toggled when there are unsaved modifications, where the modification is saved by vim
Set Guioptions-=t "Hide the toolbar
Set guioptions-=m "Hide Menu bar
Set smartindent "Use Smart Auto indent when new rows are turned on
Set Backspace=indent,eol,start
"No setting in Insert State cannot remove carriage return with backspace and delete keys
Set Cmdheight=1 "Sets the number of lines on the command line to 1
Set laststatus=2 "Show status bar (default = 1, cannot display status bar)
Set statusline=\%<%f[%1*%m%*%n%r%h]%=\%y\%0 (%{&fileformat}\%{&encoding}\%c:%l/%L%) \
"Sets the information displayed in the status line
Set foldenable "Start folding
Set Foldmethod=syntax "Setting syntax folding
Set foldcolumn=0 "Sets the width of the collapsed area
Setlocal foldlevel=1 "Sets the number of collapsed layers to
Set Foldclose=all to automatically turn off folding
"Use the SPACEBAR to switch folding
"Nnoremap <space> @= (foldclosed (Line (')) < 0)? ' Zc ': ' zo ') <CR>
The Configure multi-lingual environment
If has ("Multi_byte")
"UTF-8 Code
Set Encoding=utf-8
Set Termencoding=utf-8
Set formatoptions+=mm
Set FENCS=UTF-8,GBK
"CTRL + C copy in selected state
Vmap <C-c> "+y
Vim Common Configuration