[Gllug] vi indenting
Nix
nix at esperi.demon.co.uk
Wed Dec 19 09:27:15 UTC 2001
On Wed, 19 Dec 2001, tet at accucard.com uttered the following:
>
>>> Can anyone tell me how to indent several lines at once with spaces in vi?
>
> Simple answer: don't do it! Indenting is done with tabs, The Way God
> Intended (tm) :-)
Do you have any idea how annoying that is when a file is indented by
people with their tabstop set to different values?
Indenting a file with tabs is a good way of converting it to unreadable
shit (traditional vi's habit, in optimize mode, of converting single
spaces in the middle of a line into tabs doesn't help here). GNU indent
and/or Emacs c-mode indent can get a little distance toward recovery,
but it can't clean up the optimize-mode damage.
See <http://www.jwz.org/doc/tabs-vs-spaces.html>, one of the best
analyses of the subject I've seen. (Rather Emacs-centric, but given who
the author is this is perhaps to be expected. Besides, vi can do it
right, too; turn off the odious optimize and ruthlessly discard
tabs. :) )
--
`Mmm... Maybe I just like strong women that can hurt me?'
--- Vadik, on female throat-cutting doctors
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list