. vimrc file
We have already learned that the configuration file for vim is VIMRC file and that the VIMRC file is divided into system VIMRC file and user vimrc file . Under normal circumstances, we do not make the system VIMRC file modification, but each user for their own needs of the user VIMRC file configuration.
path to the VIMRC file
Open Vim and enter the ": Version" command to see the path setting rules for VIMRC:
? Linux Systems
? Windows system
• User VIMRC file
Usually there will be a default VIMRC file in the user's home directory, and if not, create a plain text file named ". VIMRC".
Vim Common Configuration indent settings
set Smarttab " set tab length to 4 spaces set tabstop =4 " set shiftwidth =4 " set tab character to automatically convert to a space set Expandtab " set smart indent, other selectable indents: Autoindent, cindent, indentexpr set smartindent
• Font settings
" in a Windows system: Set Guifont=courier_new:h12:cansi Set Guifont=courier\ new\
• Display line numbers
" Set display line number, turn off line number display command: Set Nonumber Set Number
• color scheme
" set a color scheme ColorScheme Desert
Vim Common settings