[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] CVS diff: hard vs. soft tabs



on Fri, 10 Oct 2003 11:44:14AM -0400, Roberto Sanchez insinuated:
> Nori Heikkinen wrote:
[...]
> >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.
> >
> >is there some way to open the file in emacs (in which i assumer it
> >was originally written; i use vim) and run it through a
> >re-indentder with hard tabs on?  or could i do this in vim?
>
> 
> You could probably write a quick script that will eliminate all
> leading spaces on every line.  Once that is done, just run it
> through indent.

wow, that's a neat program!

but (a) this is Java code; and (b) indent looks like it has so many
tweakable options that to find every single preference the original
coder used would take way too much reformatting, checking in, diffing
... i'd just like to turn whitespace into tabs here, without having my
code completely re-formatted.  if that's possible.

thanks,

</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: pgp7OQOAcyRqx.pgp
Description: PGP signature


Reply to: