Personalized configuration of vim (easy to program)

Create a new vimrc in the user's home directory. E.g:
vim ~/.vimrc
Then copy it in.
 
The configuration is as follows:
" Close the vim consistency principle 
set nocompatible
 " display the line number 
set number
 " set the row and column information of the cursor to be displayed in the lower right corner during the editing process 
set ruler
 " display the command being entered in the status bar 
set showcmd
 " set the number of history records 
set history= 1000 
" Set cancel backup to prohibit the generation of temporary files 
set nobackup
set noswapfile
" Set the match mode 
set showmatch
 " Set the C/C++ way to automatically align 
set autoindent
set cindent
" Enable syntax highlighting 
syntax enable
syntax on
" Specify the color scheme as 256 colors 
set t_Co= 256 
" Set ignore case when searching 
set ignorecase
 " Configure the way backspace works 
set backspace= indent,eol,start
 " Setting in vim can use the mouse 
set mouse= a
 " Set the tab width 
set tabstop= 4 
" Set the number of automatic alignment spaces 
set shiftwidth= 4 
" When setting the backspace key, you can delete 4 spaces 
set smarttab
set softtabstop = 4 
" Automatically convert tab keys to spaces 
set expandtab
 " Set encoding method 
set encoding=utf- 8 
" When automatically judging encoding, try the following encodings in turn 
set fileencodings=ucs-bom,utf- 8 ,cp936,gb18030,big5, euc-jp,euc- kr,latin1
 " Detect file type 
filetype on
 " Use different indentation methods for different files 
filetype indent on
 " Allow plugin 
filetype plugin on
 " Start intelligent completion 
filetype plugin indent on

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325522940&siteId=291194637