4
I have a project where some files are indented with tab
and others with 4 spaces. Is there any way in Vim to reindentate all files for 4 spaces?
4
I have a project where some files are indented with tab
and others with 4 spaces. Is there any way in Vim to reindentate all files for 4 spaces?
3
One way is to use the :set expandtab
to define the number of spaces it is possible to use :set tabstop=4
then use the command :retab
to convert the file.
1
To change on all lines:
:%s/\t/ /g
Or, if you want to change only on the current line:
:s/\t/ /g
Browser other questions tagged vim
You are not signed in. Login or sign up in order to post.
Complementing, you can use
:argdo retab | update
to do for all open files.– elias