I have a project where some files are indented with tab
and others with 4 spaces. Is there any way in Vim to reinden all files to 4 spaces?
I have a project where some files are indented with tab
and others with 4 spaces. Is there any way in Vim to reinden all files to 4 spaces?
One way is to use :set expandtab
to set the number of spaces it is possible to use :set tabstop=4
then use the :retab
command to convert the file.
To change on all lines:
:%s/\t/ /g
Or, if you want to change only the current line:
:s/\t/ /g