Текстовые метки: vim
Раздел: root - Linux - vim
Depending on what you mean by tab, one of the following should work:
" size of a hard tabstop
" size of an "indent"
" a combination of spaces and tabs are used to simulate tab stops at a width
" other than the (hard)tabstop
You may also want to try the following:
" make "tab" insert indents instead of tabs at the beginning of a line
" always uses spaces instead of tab characters
See :help 'optionname' (eg: :help 'tabstop') for more details on any of these.
In a codebase that uses 4 space characters for each indent, here are good settings to start with:
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
In a codebase that uses a single tab character that appears 4-spaces-wide for each indent these settings should work:
set tabstop=4 softtabstop=0 noexpandtab shiftwidth=4