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

From: Nori Heikkinen (nori_at_sccs.swarthmore.edu)
Date: 10/10/03

  • Next message: Joachim Fahnenmueller: "Re: [solved] System refuses to load uhci instead of usb-uhci"
    Date: Fri, 10 Oct 2003 14:29:49 -0400
    To: debian-user <debian-user@lists.debian.org>
    
    
    

    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!)
    
    

    -- 
    To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

    • application/pgp-signature attachment: stored

  • Next message: Joachim Fahnenmueller: "Re: [solved] System refuses to load uhci instead of usb-uhci"

    Relevant Pages

    • Re: sed/awk, instead of Perl
      ... user.name TAB domain.tld ... write it back to either a new file, the original file, or to STDOUT ... I'm curious why Perl isn't a decent choice. ...
      (freebsd-questions)
    • Re: sed/awk, instead of Perl
      ... user.name TAB domain.tld ... write it back to either a new file, the original file, or to STDOUT ... I'm curious why Perl isn't a decent choice. ...
      (freebsd-questions)
    • Re: sed/awk, instead of Perl
      ... user.name TAB domain.tld ... write it back to either a new file, the original file, or to STDOUT ... I'm curious why Perl isn't a decent choice. ...
      (freebsd-questions)
    • Re: I dont quite understand this exercise...
      ... >ask the user/get and set a variable, say n, and replace all tabs with n ... A text file containing some tab characters. ... if N is 4 and the original file is: ... int jj = 0; ...
      (comp.lang.c)
    • Re: Text only apps
      ... Python's learning curve is a lot more gentle than perl's. ... structure Python is one of the nicest languages that I've come across. ... If you do your indenting with spaces, ... Python gives a tab the same 'value' as a space!!! ...
      (uk.comp.os.linux)