2_设置系统的tab命令为4个空格

修改全局环境变量():

vim /etc/vim/vimrc


添加如下配置(推荐)

set tabstop=4

set shiftwidth=4

set softtabstop=4

set expandtab


释义:

set tabstop=4 " The width of a TAB is set to 4.

                    " Still it is a \t. It is just that

                    " Vim will interpret it to be having

                    " a width of 4.

set shiftwidth=4    " Indents will have a width of 4

set softtabstop=4  " Sets the number of columns for a TAB

set expandtab      " Expand TABs to spaces


cited from https://stackoverflow.com/questions/1878974/redefine-tab-as-4-spaces

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容