vim使用四个空格代替TAB键 让VIM可以在你写程序的时候自动缩进,并用4个空格代替TAB键。 编辑 ~/.vimrc 保存这四行: “set smartindent”, “set tabstop=4”, “set shiftwidth=4”, “set expandtab”