从终端打开配置文件: vim ~/.vimrc 添加如下代码: set tabstop=4 set softtabstop=4 set shiftwidth=4 set autoindent set cindent set cinoptions={0,1s,t0,n-2,p2s,(03s,=.5s,>1s,=1s,:1s set nu set ruler set hlsearch set backspace=2 含义如下: 1.设置(软)制表符宽度为4 set tabstop=4 set sof…