设置vim tap键的缩进长度为4个空格 设置vim tap键的缩进长度为4个空格 执行 vim .vimrc 在打开的文件中输入一下配置 set ts=4 set sw=4 set expandtab set autoindent 使用 gg=G可以格式化代码 缩进仍然是4个空格