在root文件夹下,创建 .vimrc 文件,输入下列代码保存即可
set number
filetype on
set history=1000
set nocompatible
set shiftwidth=4
syntax on
set autoindent
set smartindent
set tabstop=4
set showmatch
set guioptions-=T
set vb t_vb=
set ruler
set nohls
set incsearch
if has("vms")
set nobackup
else
set backup
endif
inoremap ( ()
inoremap [ []
inoremap { {}
inoremap < <>
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8