To make indentations 4 spaces wide:
:set shiftwidth=4
To use spaces as indents, 4 spaces wide:
:set expandtab
:set softtabstop=4
softtabstop and sts are equivalent:
:set sts=4
To use tabs as indents, 4 spaces wide:
:set noexpandtab
:set tabstop=4
tabstop and ts are equivalent:
:set ts=4
:set autoindent
| Instruction | Description | Default |
|---|---|---|
| tabstop | width of tab character | 8 |
| expandtab | causes spaces to be use instead of tab character | off |
| softabstop | tune the whitespace | 0 |
| shiftwidth | determines whitespace amount when in normal mode | 8 |