vim 之自动缩进(smartindent) tab 空格数设置为4

  1. 打开设置文件:

[html] view plain copy

sudo vim /etc/vim/vimrc
或 首先,在命令中输入vim ~/.vimrc
  1. 添加以下代码:

[plain] view plain copy

set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
set softtabstop=4

你可能感兴趣的:(vim 之自动缩进(smartindent) tab 空格数设置为4)