.vimrc:
" add by school1024.com set ts=4 set softtabstop=4 set shiftwidth=4 set expandtab set autoindent
TAB替换为空格
:set ts=4
:set expandtab
:%retab!
空格替换为TAB
:set ts=4
:set noexpandtab
:%retab!
参考:https://cloud.tencent.com/developer/article/1722322