Monthly Archives: January 2017

vim replace multiple spaces with tab

xxxx            xxxx xxxxxxxxxxx
yy              y y yyyyyy
zzzzzzzzzz      zzzzzzzzzzz zzz zzz

Change the consecutive spaces with a tab so it looks like this
:%l
xxxx^Ixxxx xxxxxxxxxxx
yy^Iy y yyyyyy
zzzzzzzzzz^Izzzzzzzzzzz zzz zzz

:%s/ \+/^I/