[Gllug] vi indenting

tet at accucard.com tet at accucard.com
Wed Dec 19 10:32:03 UTC 2001


>OK then, is there a way to get vi to convert several spaces to a tab
>and back?

The way I do it is to set my tapstop and shiftwidth to be the same,
and then do:

	:%>
	:%<

Which indents the whole file, then outdents it again, thus neatly
converting spaces to tabs. If you want to go the other direction, you
can either do the same trick with a huge tapstop, or just pipe the
file through expand or detab:

	1G!Gexpand

Tet

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list