Vedi l'esempio di seguito,
// Start vim without loading your vimrc. set only tabstop=8 softtabstop=4.
// This makes <Tab> in insert mode equals to 4 <Space> length at max.
// In insert mode, type 12, one <Tab>, 5. We get insertion below,
12··5
// Quit insert mode. Move cursor back, we find 2 <Space> inserted.
// In insert mode, type 12, two <Tab>, 9. We get insertion below,
12······9
// Quit insert mode. Move cursor back, you find a <Tab> inserted.
// In insert mode, type 12, three <Tab>, 3. We get insertion below,
12··········3
// Move the cursor back, you find a <Tab> and 4 <Space> inserted.
// We can even set sotftabstop=12, but this time we only need type one <Tab>, then 3.
12··········3
// Move the cursor back, you find a <Tab> and 4 <Sapce> inserted.
Lo stesso tabstopvale per l'ampiezza di una Tabdefinita, mentre softtabstopper quanto riguarda la distanza di spostamento del cursore durante la digitazione Tab . Quando non sono impostati per avere lo stesso valore, significa che se si preme il Tabtasto, non implica banalmente un Tabpersonaggio. In ogni caso, è Vim a decidere quando si esce dalla modalità di inserimento. Vim tenterà innanzitutto di abbinare l'inserzione il maggior numero tabstoppossibile; se alla fine non riesce a fare un pieno tabstop, vim compensa semplicemente Space.
Per parlare un po 'di più, se si imposta expandtab, è uguale a dire a Vim:
Si prega di non preoccuparsi di calcolare quanti Tabed Sapceè necessario. Basta inserire Space.