vi editor configuration


The configuration of vi editor
cd /etc/vim
cp vimrc ~/.vimrc
cd ~
gedit .vimrc
Add the following content to .vimrc:


"Close the compatibility function
set nocompatible 
"Display line number
set number
"When editing, the backspace key is set to 2 space
set backspace=2
"set tab key to 4 spaces when editing
set tabstop=4
"set auto-align to 4 spaces
set shiftwidth=4
"case insensitive when searching
set ignorecase
"highlighting when searching
set hlsearch

Guess you like

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