I like to use spaces for indentation, not tabs; replacing tabs at the beginning of a line is easy at sedor vim:
s/^I/ /g
But if there are tabs in the line (pretend that spaces are the width of the char tab):
'foo'^I ^I => 'bar',
'bazzle'^I => 'qux',
Each tab does not match a given number of spaces to maintain alignment. Does anyone have a tricky idea on how to replace these tabs with spaces while maintaining proper alignment?
source
share