I have a file with a lot of tabs that i need to set the tab spacing to 4 and expand out the tabs. I am able to set expandtab bu开发者_运维问答t it does not expand out the tabs for tabs already in the file.
Do the following
:se et
:se ts=4
:ret
The first command sets the expand tab, the second sets tab spacing to 4, and finally the third one re-tabs and converts tabs to spaces
"Super retab":
:retab
converts all sequences of tabstops or spaces, even those that might be in a "quoted string like this". This tip shows how to convert only the indents at the line beginnings. Any spaces or tabstops after the first non-white character are not affected.
精彩评论