vim tab size,8 空格改4空格

一定是 这个文件   ~/.vimrc

vim ~/.vimrc

 

加入 可以完成 函数换行自动 四空格 tab

" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Use filetype detection and file-based automatic indenting.
filetype plugin indent on
" Use actual tab chars in Makefiles.
autocmd FileType make set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab
endif

" For everything else, use a tab width of 4 space chars.
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.

posted @ 2021-07-28 21:17  熬夜写bug呢  阅读(146)  评论(0编辑  收藏  举报