dman, you rock as usual.
on Fri, 10 Oct 2003 12:33:17PM -0400, Derrick 'dman' Hudson insinuated:
> On Fri, Oct 10, 2003 at 09:48:34AM -0400, Nori Heikkinen wrote:
> | hey all,
> |
> | this is kind of off-topic, but i figured this is the community most
> | likley to have dealt with this sort of thing in the past, and be
> | opinionated about it.
> |
> | i've been editing a lot of code over the past few months that was
> | originally saved to disk with hard tabs for indenting. i can't work
> | with hard tabs, and so managed to reformat the entire thing to use
> | spaces (basically a "s,^I, ," iirc) before i began my massive
> | overhaul of this file.
>
> Read ":help retab". It is so much nicer :-).
i just did -- and should have to begin with. awesome.
> | now it's time to check it into CVS. i don't want every single line to
> | show up as different just because of tab characters, so i need to find
> | a good solution on how to transform my indents back into tab
> | characters. clearly the reverse -- "s, ,^I," -- won't just work, as
> | there are places where two spaces exist that i wouldn't want a tab.
>
> :set noet sts=2 sw=2 ts=2
> :retab!
oh, so that's what the ! is about at the end of retab ...
very cool, and exactly what i was asking for.
turns out my original file wasn't quite in the format i thought it
was, but knowing these tricks, i was able to reformat and re-check-in
the original before committing the changes. very clean.
thanks a lot to all who responded!
</nori>
--
.~. nori @ sccs.swarthmore.edu
/V\ http://www.sccs.swarthmore.edu/~nori/jnl/
// \\ @ maenad.net
/( )\ www.maenad.net
^`~'^
get my (*new*) key here:
http://www.maenad.net/geek/gpg/7ede5499.asc
(please *remove* old key 11e031f1!)
Attachment:
pgpg4XidqbeT0.pgp
Description: PGP signature