Loading ...
Sorry, an error occurred while loading the content.

Re: GNU coding style indent stuff

Expand Messages
  • Thomas Köhler
    On Tue, Feb 29, 2000 at 04:46:38AM +0100, ... Ah, a Linux user :-) ... Well, yes. To speak with Linus Torvalds: jean-luc@picard /usr/src/linux/Documentation
    Message 1 of 3 , Feb 29 12:35 AM
    • 0 Attachment
      On Tue, Feb 29, 2000 at 04:46:38AM +0100,
      Tomas Ogren <stric@...> wrote:
      > X-System: Linux thelma 2.0.38

      Ah, a Linux user :-)

      > Hello.
      >
      > Maybe we could put in a FAQ or something how to get GNU coding style...?
      >
      > This gives a pretty good result, one minor issue when multiline defines
      > are involved tho...
      >
      > set cinoptions={.5s,:.5s,+.5s,t0,g0,^-2,e-2,n-2,p2s,(0,=.5s
      > formatoptions=croql cindent sw=4 ts=8
      >
      > enhancements anyone?

      Well, yes. To speak with Linus Torvalds:

      jean-luc@picard /usr/src/linux/Documentation> grep -1 GNU CodingStyle | head -3

      First off, I'd suggest printing out a copy of the GNU coding standards,
      and NOT read it. Burn them, it's a great symbolic gesture.

      Simply don't use the GNU coding style :-)

      :-)))

      CU,
      Thomas

      --
      Thomas Köhler Email: jean-luc@... | LCARS - Linux
      <>< WWW: http://jeanluc-picard.de | for Computers
      IRC: jeanluc | on All Real
      PGP public key available from Homepage! | Starships
    • Tomas Ogren
      ... And Solaris, SunOS, AIX, IRIX, NeXT, ... ... [...] ... Well. there are projects out there using GNU coding style, and like it or not if you re in one of
      Message 2 of 3 , Feb 29 10:47 AM
      • 0 Attachment
        On 29 February, 2000 - Thomas Köhler sent me these 1.0K bytes:

        > On Tue, Feb 29, 2000 at 04:46:38AM +0100,
        > Tomas Ogren <stric@...> wrote:
        > > X-System: Linux thelma 2.0.38
        >
        > Ah, a Linux user :-)

        And Solaris, SunOS, AIX, IRIX, NeXT, ...

        > > Hello.
        > >
        > > Maybe we could put in a FAQ or something how to get GNU coding style...?
        >
        [...]
        > Simply don't use the GNU coding style :-)

        Well. there are projects out there using GNU coding style, and like it
        or not if you're in one of those projects you have to follow that style.
        We don't want to tell people to use emacs or some crap like that just
        to get the "right" indent style, do we? 8)

        /Tomas
        --
        Tomas Ögren, stric@..., http://www.ing.umu.se/~stric/
        |- Student at Computing Science, University of Umeå
        `- Sysadmin at {cs,ing,acc}.umu.se
      • Scott Bigham
        ... Well, setting aside Thomas singularly unhelpful reply... :-/ We use a GNU-like indent style at the office, and I d pretty much settled on: set
        Message 3 of 3 , Feb 29 4:38 PM
        • 0 Attachment
          On Feb 29, 2000, Tomas Ogren wrote:

          > Maybe we could put in a FAQ or something how to get GNU coding style...?

          Well, setting aside Thomas' singularly unhelpful reply... :-/ We use a
          GNU-like indent style at the office, and I'd pretty much settled on:

          set cinoptions=(0,g0,{s,>2s,n-s,^-s,t0 sw=2

          This has the small problem that blocks inside a switch() get offset too
          much:

          void f()
          {
          switch (x)
          {
          case 5:
          {
          break;
          }
          case 7:
          {
          break;
          }
          }
          }

          Oddly, this used to be worse, in that successive blocks kept getting
          indented further and further,[*] but that no longer seems to happen with
          5.6.11. Was this a bug fix I missed?

          -sbigham

          [*] <URL:http://www.egroups.com/group/vim/7215.html?>
        Your message has been successfully submitted and would be delivered to recipients shortly.