Gestione Tabulazioni
Jump to navigation
Jump to search
Opzioni per la gestione corretta delle tabulazioni
:help tabstop recita:
1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4 (or 3 or whatever you prefer) and use 'noexpandtab'. Then Vim will use a mix of tabs and spaces, but typing Tab and BS will behave like a tab appears every 4 (or 3) characters.
Quindi usare:
set tabstop=8 set softtabstop set shiftwidth=4
Impostare una lungheza fissa per il tab diversa da 8 spazi
To control the number of space characters that will be inserted when the tab key is pressed, set the 'tabstop' option.
For example, to insert 4 spaces for a tab, use:
set tabstop=4
After the 'expandtab' option is set, all the new tab characters entered will be changed to spaces.
This will not affect the existing tab characters.
To change all the existing tab characters to match the current tab settings, use
:retab
Convertire gli spazi in tabulazioni
Per convertire TUTTI le sequnze di spazi con dei TAB, anche se non contengono un TAB:
:%retab!