- 打开设置文件:
[html] view plain copy
sudo vim /etc/vim/vimrc
或 首先,在命令中输入vim ~/.vimrc
- 添加以下代码:
[plain] view plain copy
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
set softtabstop=4
[html] view plain copy
sudo vim /etc/vim/vimrc
或 首先,在命令中输入vim ~/.vimrc
[plain] view plain copy
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
set softtabstop=4