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

Re: [edit+] EditPlus, VIM, tab spacing

Expand Messages
  • DZ-Jay
    Also, if you are using tabs instead of spaces, then check the tab-size set in the syntax section of EditPlus preferences. It could be that VIM is displaying
    Message 1 of 14 , May 13, 2009
    • 0 Attachment
      Also, if you are using tabs instead of spaces, then check the tab-size
      set in the syntax section of EditPlus' preferences. It could be that
      VIM is displaying tabs as, say, 8 spaces, while EditPlus is using 4.

      dZ.

      --
      "The ability to see things as they actually are is commonly called
      cynicism by those who haven't got it."

      --George Bernard Shaw

      On May 13, 2009, at 14:12, Bronius Motekaitis wrote:

      > Hmm.. It sounds like a difference between spaces vs tabs and
      > actually font
      > size as well. You might verify that your fonts are fixed-width (I
      > imagine
      > you've not gone and customized your ssh/telnet to muck with vim
      > settings, so
      > this is likely an easy check in View>>Screen Font in EditPlus), and
      > verify
      > that you're using spaces or tabs in both and that the tabs tab over
      > the same
      > number of columns in both editors.
      >
      > -bronius
      >
      >
      > On Wed, May 13, 2009 at 1:08 PM, allthenamesrtook <
      > allthenamesrtook@...> wrote:
      >
      >>
      >>
      >> When I tab things to line up in editplus, then use vim to edit a
      >> file, they
      >> are far from matching up. Anyone else run into this? Ideas?
      >>
      >>
      >>
      >
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      > ------------------------------------
      >
      > http://www.editplus.comYahoo! Groups Links
      >
      >
      >
    • Perminov Vladimir
      Before save try to convert tabs to spaces or leading spaces to tabs.
      Message 2 of 14 , May 14, 2009
      • 0 Attachment
        Before save try to convert tabs to spaces or leading spaces to tabs.

        > When I tab things to line up in editplus, then use vim to edit a file, they are far from matching up. Anyone else run into this? Ideas?
      • Mark Kahn
        There really needs to be a manual on how tabs and spaces work that everyone MUST read before ever attempting to write code (no offense to you personally ;))
        Message 3 of 14 , May 15, 2009
        • 0 Attachment
          There really needs to be a manual on how tabs and spaces work that everyone
          MUST read before ever attempting to write code (no offense to you personally
          ;))

          There's a million points of view, but here's mine and anyone that tells you
          anything different is flat out wrong:

          - everything gets indented with tabs. If blocks, for loops, functions,
          etc. NEVER use spaces for block indentation. It's a rude and obtrusive
          practice that forces your style on other people.
          - AFTER the first non-tab character of a line, NEVER use another tab. e.g.
          f you're aligning variables, punctuation or whatnot use spaces. The one
          possible exception to this is to put tabs before line comments. Do whatever
          you want here.
          - If you're aligning the beginning of a line, e.g. you're aligning function
          variables, use the SAME NUMBER of tabs as the first line and then spaces.
          So you have "\t\tfunction foo(arg1\n\t\t<<SPACES GO HERE>>arg2)"

          Do this and your code will look right no matter what editor you open it in,
          no matter what the tab settings are. You can freely change your tab with
          from 4 to 2 or 8 and your code still looks right!

          The only somewhat "valid" argument I've EVER heard for using spaces instead
          is that some SVN diffs (e.g. in e-mails or whatnot) strip tabs, but to me
          that just means you need to fix your diff app.

          -Mark

          On Wed, May 13, 2009 at 11:08 AM, allthenamesrtook <
          allthenamesrtook@...> wrote:

          >
          >
          > When I tab things to line up in editplus, then use vim to edit a file, they
          > are far from matching up. Anyone else run into this? Ideas?
          >
          >
          >


          [Non-text portions of this message have been removed]
        • Daniel Gibby
          Amen brother. Someone actually agrees with me without me having to explain it to them. I m glad I m not the only one out there who thinks this way. Daniel ...
          Message 4 of 14 , May 15, 2009
          • 0 Attachment
            Amen brother.
            Someone actually agrees with me without me having to explain it to them.
            I'm glad I'm not the only one out there who thinks this way.

            Daniel

            On Fri, May 15, 2009 at 1:37 AM, Mark Kahn <cwolves@...> wrote:

            >
            >
            > There really needs to be a manual on how tabs and spaces work that everyone
            > MUST read before ever attempting to write code (no offense to you
            > personally
            > ;))
            >
            > There's a million points of view, but here's mine and anyone that tells you
            > anything different is flat out wrong:
            >
            > - everything gets indented with tabs. If blocks, for loops, functions,
            > etc. NEVER use spaces for block indentation. It's a rude and obtrusive
            > practice that forces your style on other people.
            > - AFTER the first non-tab character of a line, NEVER use another tab. e.g.
            > f you're aligning variables, punctuation or whatnot use spaces. The one
            > possible exception to this is to put tabs before line comments. Do whatever
            > you want here.
            > - If you're aligning the beginning of a line, e.g. you're aligning function
            > variables, use the SAME NUMBER of tabs as the first line and then spaces.
            > So you have "\t\tfunction foo(arg1\n\t\t<<SPACES GO HERE>>arg2)"
            >
            > Do this and your code will look right no matter what editor you open it in,
            > no matter what the tab settings are. You can freely change your tab with
            > from 4 to 2 or 8 and your code still looks right!
            >
            > The only somewhat "valid" argument I've EVER heard for using spaces instead
            > is that some SVN diffs (e.g. in e-mails or whatnot) strip tabs, but to me
            > that just means you need to fix your diff app.
            >
            > -Mark
            >
            >
            > On Wed, May 13, 2009 at 11:08 AM, allthenamesrtook <
            > allthenamesrtook@... <allthenamesrtook%40yahoo.com>> wrote:
            >
            > >
            > >
            > > When I tab things to line up in editplus, then use vim to edit a file,
            > they
            > > are far from matching up. Anyone else run into this? Ideas?
            > >
            > >
            > >
            >
            > [Non-text portions of this message have been removed]
            >
            >
            >


            [Non-text portions of this message have been removed]
          • dz@caribe.net
            Hello: That solution is not necessarily valid on all cases. What you may not be aware of is that there are various interpretations of what a tab is--which
            Message 5 of 14 , May 15, 2009
            • 0 Attachment
              Hello:
              That solution is not necessarily valid on all
              cases. What you may not be aware of is that there
              are various interpretations of what a "tab" is--which
              is the reason why there isn't a universally accepted
              size for them. Some implementations interpret a
              "tab" not as a specific number of columns from the
              left margin, but as the alignment of the tabular
              columns on the screen, which may or may not be
              equally spaced. As a matter of fact, this is the
              original intention of the "tab" key as implemented by
              type-writers before computer terminals.

              Thus, hitting the "tab" key would not move the
              cursor, say, four spaces to the right, but actually
              align it with the next "tab" column, which may be
              closer or farther away. Believe it or not, there are
              still some terminals that work like this, and the
              reason why ANSI standards let the terminal interpret
              "tabs" them as they wish. Some editors support this
              type of alignment and I know people who prefer it.

              I'm sure some would say something like "I've
              never seen that; to me tabs just move the cursor a
              number of columns to the right. That's probably
              something to do with old terminals, so I shouldn't
              have to worry about it"; but wouldn't that be the
              same as imposing your standard on those who work with
              such terminals or applications?

              In the end, each person should use whatever he
              feels comfortable with, and if they come across
              someone else's file and they can't reconcile with
              it's formatting style, then it's simple enough to
              change it; there are even tools out there to clean up
              and re-format code. You have to draw the line
              somewhere, and perhaps the most appropriate action is
              to agree on a common format and understand that it is
              just a common compromise amongst individuals and not
              The One True Tab Format(tm).

              OK, that takes care of indentation. Do you want
              to tackle curly-brace position next? :)

              -dZ.

              On Fri, May 15, 2009 at 1:37 AM, Mark Kahn
              <cwolves@...> wrote:
              >
              > There really needs to be a manual on how tabs and
              spaces work that everyone
              > MUST read before ever attempting to write code (no
              offense to you
              > personally
              > ;))
              >
              > There's a million points of view, but here's mine
              and anyone that tells you
              > anything different is flat out wrong:
              >
              > - everything gets indented with tabs. If blocks,
              for loops, functions,
              > etc. NEVER use spaces for block indentation. It's a
              rude and obtrusive
              > practice that forces your style on other people.
              > - AFTER the first non-tab character of a line,
              NEVER use another tab. e.g.
              > f you're aligning variables, punctuation or whatnot
              use spaces. The one
              > possible exception to this is to put tabs before
              line comments. Do whatever
              > you want here.
              > - If you're aligning the beginning of a line, e.g.
              you're aligning function
              > variables, use the SAME NUMBER of tabs as the first
              line and then spaces.
              > So you have "\t\tfunction foo(arg1\n\t\t<<SPACES GO
              HERE>>arg2)"
              >
              > Do this and your code will look right no matter
              what editor you open it in,
              > no matter what the tab settings are. You can freely
              change your tab with
              > from 4 to 2 or 8 and your code still looks right!
              >
              > The only somewhat "valid" argument I've EVER heard
              for using spaces instead
              > is that some SVN diffs (e.g. in e-mails or whatnot)
              strip tabs, but to me
              > that just means you need to fix your diff app.
              >
              > -Mark
              >
              >
              > On Wed, May 13, 2009 at 11:08 AM, allthenamesrtook <
              > allthenamesrtook@...
              <allthenamesrtook%40yahoo.com>> wrote:
              >
              > >
              > >
              > > When I tab things to line up in editplus, then
              use vim to edit a file,
              > they
              > > are far from matching up. Anyone else run into
              this? Ideas?
              > >
              > >
              > >
              >
              > [Non-text portions of this message have been removed]
              >
              >
              >
            • Mark Kahn
              Erm.... Every editor I know of treats tabs as column alignments, even notepad :) It s what a tab IS, even if people don t realize it. The only thing that
              Message 6 of 14 , May 15, 2009
              • 0 Attachment
                Erm.... Every editor I know of treats tabs as column alignments, even
                notepad :) It's what a tab IS, even if people don't realize it. The only
                thing that changes is where those column alignments fall, or "tab width".

                Type "1234567<tab>8" in notepad and the tab will look like one space. Put
                something immediately after the 7 and it'll look like 8 spaces. EditPlus
                does the same, so does vi, emacs, ...

                Any editor that puts in a flat "4 spaces", or whatever the tab width is set
                to, is wrong :)

                So my rant holds, there is a proper way to indent code :D As for the "each
                person should use whatever he feels comfortable with", I agree with the
                sentiment, but to be honest it doesn't work. There's two issues with it.
                The first is, well, just ignorance. Take this tread for instance (again,
                absolutely nothing against the original poster)... issues like this come up
                all the time simply because people indent code poorly. At some point, EVERY
                person that works in a team does one of two things: Adopts what I wrote, at
                least the part about using tabs at the beginning of a line... or they get
                frustrated.

                Worse, FAR worse perhaps, is when you have people on the same team using
                drastically different styles. Person #1 has a tab setting of "tab width=4,
                convert tabs to spaces" (whoever invented that option should be shot, btw).
                Person #2 has "tab width=2, tabs are tabs". Now the same file gets edited
                by both people. Person #1 almost always sees the file looking the way it
                should, but because of the intrusive "convert tabs to spaces" option, Person
                #2 often sees very messed up indentation.

                Honestly, I don't care -that- much about any of what I wrote OTHER than
                this: "NEVER use spaces to indent the beginning of a line". It flat out
                pushes your style on anyone that looks at your code, or just blows up
                indentation. And yes, you can fix it, even automatically, BUT.... I
                sometimes don't want to! You have a file that's been in SVN for a year, you
                don't want to touch EVERY single line just to fix indentation.


                Okay, Braces! I don't care as long as the code is indented properly! You
                can see blocks easier with proper indentation than you can with braces
                anyway. Personally I put them at the end of the code line: "if (foo) {".
                Except when I have multi-line statements, usually function declarations,
                then they go on their own line. Oh, but closing braces NEED their own
                line. I don't care if you put 5 on the same line: "}}}}}", but NEVER put
                them after code: "return; }", the ONLY exception to this being one-line
                statements: "if (foo) { return; }"

                Also, ALWAYS use braces!! One-line statements in the form "if (foo)
                return;", especially if there's a line break in there, should never be
                used. It's far too easy to miss the fact that there are no braces when you
                later edit the code and instead of "if (foo) { foo(); bar(); }", you get:
                "if (foo) { foo(); } bar();"

                -Mark


                On Fri, May 15, 2009 at 8:39 AM, dz@... <dz@...> wrote:

                >
                >
                > Hello:
                > That solution is not necessarily valid on all
                > cases. What you may not be aware of is that there
                > are various interpretations of what a "tab" is--which
                > is the reason why there isn't a universally accepted
                > size for them. Some implementations interpret a
                > "tab" not as a specific number of columns from the
                > left margin, but as the alignment of the tabular
                > columns on the screen, which may or may not be
                > equally spaced. As a matter of fact, this is the
                > original intention of the "tab" key as implemented by
                > type-writers before computer terminals.
                >
                > Thus, hitting the "tab" key would not move the
                > cursor, say, four spaces to the right, but actually
                > align it with the next "tab" column, which may be
                > closer or farther away. Believe it or not, there are
                > still some terminals that work like this, and the
                > reason why ANSI standards let the terminal interpret
                > "tabs" them as they wish. Some editors support this
                > type of alignment and I know people who prefer it.
                >
                > I'm sure some would say something like "I've
                > never seen that; to me tabs just move the cursor a
                > number of columns to the right. That's probably
                > something to do with old terminals, so I shouldn't
                > have to worry about it"; but wouldn't that be the
                > same as imposing your standard on those who work with
                > such terminals or applications?
                >
                > In the end, each person should use whatever he
                > feels comfortable with, and if they come across
                > someone else's file and they can't reconcile with
                > it's formatting style, then it's simple enough to
                > change it; there are even tools out there to clean up
                > and re-format code. You have to draw the line
                > somewhere, and perhaps the most appropriate action is
                > to agree on a common format and understand that it is
                > just a common compromise amongst individuals and not
                > The One True Tab Format(tm).
                >
                > OK, that takes care of indentation. Do you want
                > to tackle curly-brace position next? :)
                >
                > -dZ.
                >
                >
                > On Fri, May 15, 2009 at 1:37 AM, Mark Kahn
                > <cwolves@... <cwolves%40gmail.com>> wrote:
                > >
                > > There really needs to be a manual on how tabs and
                > spaces work that everyone
                > > MUST read before ever attempting to write code (no
                > offense to you
                > > personally
                > > ;))
                > >
                > > There's a million points of view, but here's mine
                > and anyone that tells you
                > > anything different is flat out wrong:
                > >
                > > - everything gets indented with tabs. If blocks,
                > for loops, functions,
                > > etc. NEVER use spaces for block indentation. It's a
                > rude and obtrusive
                > > practice that forces your style on other people.
                > > - AFTER the first non-tab character of a line,
                > NEVER use another tab. e.g.
                > > f you're aligning variables, punctuation or whatnot
                > use spaces. The one
                > > possible exception to this is to put tabs before
                > line comments. Do whatever
                > > you want here.
                > > - If you're aligning the beginning of a line, e.g.
                > you're aligning function
                > > variables, use the SAME NUMBER of tabs as the first
                > line and then spaces.
                > > So you have "\t\tfunction foo(arg1\n\t\t<<SPACES GO
                > HERE>>arg2)"
                > >
                > > Do this and your code will look right no matter
                > what editor you open it in,
                > > no matter what the tab settings are. You can freely
                > change your tab with
                > > from 4 to 2 or 8 and your code still looks right!
                > >
                > > The only somewhat "valid" argument I've EVER heard
                > for using spaces instead
                > > is that some SVN diffs (e.g. in e-mails or whatnot)
                > strip tabs, but to me
                > > that just means you need to fix your diff app.
                > >
                > > -Mark
                > >
                > >
                > > On Wed, May 13, 2009 at 11:08 AM, allthenamesrtook <
                > > allthenamesrtook@... <allthenamesrtook%40yahoo.com>
                > <allthenamesrtook%40yahoo.com>> wrote:
                > >
                > > >
                > > >
                > > > When I tab things to line up in editplus, then
                > use vim to edit a file,
                > > they
                > > > are far from matching up. Anyone else run into
                > this? Ideas?
                > > >
                > > >
                > > >
                > >
                > > [Non-text portions of this message have been removed]
                > >
                > >
                > >
                >
                >
                >


                [Non-text portions of this message have been removed]
              • Mark Kahn
                I mis-read what you just wrote and realized I mis-understood what you were saying. So instead of a tab being 4 spaces , it may be .25 inches . Yes, I ve
                Message 7 of 14 , May 15, 2009
                • 0 Attachment
                  I mis-read what you just wrote and realized I mis-understood what you were
                  saying.

                  So instead of a tab being "4 spaces", it may be ".25 inches". Yes, I've
                  seen this. Most word processors still do this, as it makes far more sense
                  with variable width fonts. I believe it's how tabs should always be
                  interpreted, but it's more complex to implement... Basically tab stops
                  should be n * "width of one space character". So variable width fonts
                  should all align to the same place (within the same font).

                  Anyway, it doesn't matter for indentation purposes. if you use tabs it'll
                  look right no matter how a tab is interpreted.

                  -Mark

                  On Fri, May 15, 2009 at 8:39 AM, dz@... <dz@...> wrote:

                  >
                  >
                  > Hello:
                  > That solution is not necessarily valid on all
                  > cases. What you may not be aware of is that there
                  > are various interpretations of what a "tab" is--which
                  > is the reason why there isn't a universally accepted
                  > size for them. Some implementations interpret a
                  > "tab" not as a specific number of columns from the
                  > left margin, but as the alignment of the tabular
                  > columns on the screen, which may or may not be
                  > equally spaced. As a matter of fact, this is the
                  > original intention of the "tab" key as implemented by
                  > type-writers before computer terminals.
                  >
                  > Thus, hitting the "tab" key would not move the
                  > cursor, say, four spaces to the right, but actually
                  > align it with the next "tab" column, which may be
                  > closer or farther away. Believe it or not, there are
                  > still some terminals that work like this, and the
                  > reason why ANSI standards let the terminal interpret
                  > "tabs" them as they wish. Some editors support this
                  > type of alignment and I know people who prefer it.
                  >
                  > I'm sure some would say something like "I've
                  > never seen that; to me tabs just move the cursor a
                  > number of columns to the right. That's probably
                  > something to do with old terminals, so I shouldn't
                  > have to worry about it"; but wouldn't that be the
                  > same as imposing your standard on those who work with
                  > such terminals or applications?
                  >
                  > In the end, each person should use whatever he
                  > feels comfortable with, and if they come across
                  > someone else's file and they can't reconcile with
                  > it's formatting style, then it's simple enough to
                  > change it; there are even tools out there to clean up
                  > and re-format code. You have to draw the line
                  > somewhere, and perhaps the most appropriate action is
                  > to agree on a common format and understand that it is
                  > just a common compromise amongst individuals and not
                  > The One True Tab Format(tm).
                  >
                  > OK, that takes care of indentation. Do you want
                  > to tackle curly-brace position next? :)
                  >
                  > -dZ.
                  >
                  >
                  > On Fri, May 15, 2009 at 1:37 AM, Mark Kahn
                  > <cwolves@... <cwolves%40gmail.com>> wrote:
                  > >
                  > > There really needs to be a manual on how tabs and
                  > spaces work that everyone
                  > > MUST read before ever attempting to write code (no
                  > offense to you
                  > > personally
                  > > ;))
                  > >
                  > > There's a million points of view, but here's mine
                  > and anyone that tells you
                  > > anything different is flat out wrong:
                  > >
                  > > - everything gets indented with tabs. If blocks,
                  > for loops, functions,
                  > > etc. NEVER use spaces for block indentation. It's a
                  > rude and obtrusive
                  > > practice that forces your style on other people.
                  > > - AFTER the first non-tab character of a line,
                  > NEVER use another tab. e.g.
                  > > f you're aligning variables, punctuation or whatnot
                  > use spaces. The one
                  > > possible exception to this is to put tabs before
                  > line comments. Do whatever
                  > > you want here.
                  > > - If you're aligning the beginning of a line, e.g.
                  > you're aligning function
                  > > variables, use the SAME NUMBER of tabs as the first
                  > line and then spaces.
                  > > So you have "\t\tfunction foo(arg1\n\t\t<<SPACES GO
                  > HERE>>arg2)"
                  > >
                  > > Do this and your code will look right no matter
                  > what editor you open it in,
                  > > no matter what the tab settings are. You can freely
                  > change your tab with
                  > > from 4 to 2 or 8 and your code still looks right!
                  > >
                  > > The only somewhat "valid" argument I've EVER heard
                  > for using spaces instead
                  > > is that some SVN diffs (e.g. in e-mails or whatnot)
                  > strip tabs, but to me
                  > > that just means you need to fix your diff app.
                  > >
                  > > -Mark
                  > >
                  > >
                  > > On Wed, May 13, 2009 at 11:08 AM, allthenamesrtook <
                  > > allthenamesrtook@... <allthenamesrtook%40yahoo.com>
                  > <allthenamesrtook%40yahoo.com>> wrote:
                  > >
                  > > >
                  > > >
                  > > > When I tab things to line up in editplus, then
                  > use vim to edit a file,
                  > > they
                  > > > are far from matching up. Anyone else run into
                  > this? Ideas?
                  > > >
                  > > >
                  > > >
                  > >
                  > > [Non-text portions of this message have been removed]
                  > >
                  > >
                  > >
                  >
                  >
                  >


                  [Non-text portions of this message have been removed]
                • DZ-Jay
                  ... You are still assuming equally space tab stops, which are not necessarily the case. ... Isn t that the same as forcing your own personal preference on
                  Message 8 of 14 , May 16, 2009
                  • 0 Attachment
                    On May 15, 2009, at 14:16, Mark Kahn wrote:
                    > Anyway, it doesn't matter for indentation purposes. if you use tabs
                    > it'll
                    > look right no matter how a tab is interpreted.

                    You are still assuming equally space tab stops, which are not
                    necessarily the case.

                    > Basically tab stops should be n * "width of one space character".


                    Isn't that the same as forcing your own personal preference on
                    others? I'm being purposely facetious here, to show the flaw in your
                    argument. Although I grant that your suggestions are valid and based
                    on common-sense (and close to my own preferences, too), I do not agree
                    with your unwavering assertion that it is The One True Way.

                    Also, my comment regarding curly-braces was meant as a joke, alluding
                    to the other religious war frequently waged in the Internet.

                    dZ.

                    --
                    "Pluralitas non est ponenda sine neccesitate"

                    -- Occam's Razor
                  • Aleem Juma
                    ... Even with differently spaced tab stops, each level of code will be at a *different* indentation which is all that counts e.g. // tabs at spaces 4 and 6
                    Message 9 of 14 , May 16, 2009
                    • 0 Attachment
                      2009/5/16 DZ-Jay <dz@...>:
                      > On May 15, 2009, at 14:16, Mark Kahn wrote:
                      >> Anyway, it doesn't matter for indentation purposes.  if you use tabs
                      >> it'll
                      >> look right no matter how a tab is interpreted.
                      >
                      > You are still assuming equally space tab stops, which are not
                      > necessarily the case.

                      Even with differently spaced tab stops, each level of code will be at
                      a *different* indentation which is all that counts e.g.

                      // tabs at spaces 4 and 6 i.e. not equally spaced
                      function foo (bar) {
                      ....if (bar) {
                      ......foo(bar+1);
                      ......return;
                      ....} else {
                      ......foo(bar+2);
                      ......return;
                      ....}


                      >
                      >> Basically tab stops should be n * "width of one space character".
                      >
                      >
                      > Isn't that the same as forcing your own personal preference on
                      > others?  I'm being purposely facetious here, to show the flaw in your
                      > argument.  Although I grant that your suggestions are valid and based
                      > on common-sense (and close to my own preferences, too), I do not agree
                      > with your unwavering assertion that it is The One True Way.

                      Agreed - I guess the "n spaces" tab width would make most sense with
                      fixed-width fonts, and exact widths with variable-width fonts but
                      again, each to their own when it comes to how your tab widths are set
                      (I guess it would also depend somewhat on the capabilities of the
                      editor)

                      >
                      > Also, my comment regarding curly-braces was meant as a joke, alluding
                      > to the other religious war frequently waged in the Internet.

                      emacs is dead... long live vi !! ;-)

                      >
                      >        dZ.
                      >
                      > --
                      > "Pluralitas non est ponenda sine neccesitate"
                      >
                      >        -- Occam's Razor
                      >
                      >
                      >
                      > ------------------------------------
                      >
                      > http://www.editplus.comYahoo! Groups Links
                      >
                      >
                      >
                      >
                    • Aleem Juma
                      and yes i forgot the final brace... :-(
                      Message 10 of 14 , May 16, 2009
                      • 0 Attachment
                        and yes i forgot the final brace... :-(

                        2009/5/16 Aleem Juma <aleem.juma@...>:
                        > 2009/5/16 DZ-Jay <dz@...>:
                        >> On May 15, 2009, at 14:16, Mark Kahn wrote:
                        >>> Anyway, it doesn't matter for indentation purposes.  if you use tabs
                        >>> it'll
                        >>> look right no matter how a tab is interpreted.
                        >>
                        >> You are still assuming equally space tab stops, which are not
                        >> necessarily the case.
                        >
                        > Even with differently spaced tab stops, each level of code will be at
                        > a *different* indentation which is all that counts e.g.
                        >
                        > // tabs at spaces 4 and 6 i.e. not equally spaced
                        > function foo (bar) {
                        > ....if (bar) {
                        > ......foo(bar+1);
                        > ......return;
                        > ....} else {
                        > ......foo(bar+2);
                        > ......return;
                        > ....}
                        >
                        >
                        >>
                        >>> Basically tab stops should be n * "width of one space character".
                        >>
                        >>
                        >> Isn't that the same as forcing your own personal preference on
                        >> others?  I'm being purposely facetious here, to show the flaw in your
                        >> argument.  Although I grant that your suggestions are valid and based
                        >> on common-sense (and close to my own preferences, too), I do not agree
                        >> with your unwavering assertion that it is The One True Way.
                        >
                        > Agreed - I guess the "n spaces" tab width would make most sense with
                        > fixed-width fonts, and exact widths with variable-width fonts but
                        > again, each to their own when it comes to how your tab widths are set
                        > (I guess it would also depend somewhat on the capabilities of the
                        > editor)
                        >
                        >>
                        >> Also, my comment regarding curly-braces was meant as a joke, alluding
                        >> to the other religious war frequently waged in the Internet.
                        >
                        > emacs is dead... long live vi !!   ;-)
                        >
                        >>
                        >>        dZ.
                        >>
                        >> --
                        >> "Pluralitas non est ponenda sine neccesitate"
                        >>
                        >>        -- Occam's Razor
                        >>
                        >>
                        >>
                        >> ------------------------------------
                        >>
                        >> http://www.editplus.comYahoo! Groups Links
                        >>
                        >>
                        >>
                        >>
                        >
                      • Michael L. Jones
                        ... Amen, brother. I hope that Mark and others don t take offense, but I m sure everyone has noticed that most software developers have a pretty healthy ego
                        Message 11 of 14 , May 16, 2009
                        • 0 Attachment
                          --- In editplus@yahoogroups.com, DZ-Jay <dz@...> wrote:
                          >
                          > On May 15, 2009, at 14:16, Mark Kahn wrote:
                          > > Anyway, it doesn't matter for indentation purposes. if you use tabs
                          > > it'll
                          > > look right no matter how a tab is interpreted.
                          >
                          > You are still assuming equally space tab stops, which are not
                          > necessarily the case.
                          >
                          > > Basically tab stops should be n * "width of one space character".
                          >
                          >
                          > Isn't that the same as forcing your own personal preference on
                          > others? I'm being purposely facetious here, to show the flaw in your
                          > argument. Although I grant that your suggestions are valid and based
                          > on common-sense (and close to my own preferences, too), I do not agree
                          > with your unwavering assertion that it is The One True Way.

                          Amen, brother. I hope that Mark and others don't take offense, but I'm sure everyone has noticed that most software developers have a pretty healthy ego and want to do things their own way. Herding cats is easier than reaching a consensus among a team of developers of any size greater than two unless someone lays done the law, which really isn't a consensus. Then try enforcing the law!
                        • Mark Kahn
                          Lol, I know that most developers have a strong opinion on the way they do things. Tabs are, somewhat ironically, the one exception, in that many people that
                          Message 12 of 14 , May 16, 2009
                          • 0 Attachment
                            Lol, I know that most developers have a strong opinion on the way they do
                            things. Tabs are, somewhat ironically, the one exception, in that many
                            people that do it incorrectly, or rather inconsistently / just whatever the
                            default is, are people that don't care.

                            And I know I came off strong, it was mostly jokingly. I really just wish
                            that people would pay attention to tabs in code and that companies, at the
                            very least, should always adopt internal standards.


                            Also, I've recently come of the opinion that herding cats is a cakewalk.
                            I've been literally herding seals for the past several weeks... THAT is
                            difficult :D

                            -Mark

                            On Sat, May 16, 2009 at 7:31 AM, Michael L. Jones <mljones1947@...>wrote:

                            >
                            >
                            > --- In editplus@yahoogroups.com <editplus%40yahoogroups.com>, DZ-Jay <dz@...>
                            > wrote:
                            > >
                            > > On May 15, 2009, at 14:16, Mark Kahn wrote:
                            > > > Anyway, it doesn't matter for indentation purposes. if you use tabs
                            > > > it'll
                            > > > look right no matter how a tab is interpreted.
                            > >
                            > > You are still assuming equally space tab stops, which are not
                            > > necessarily the case.
                            > >
                            > > > Basically tab stops should be n * "width of one space character".
                            > >
                            > >
                            > > Isn't that the same as forcing your own personal preference on
                            > > others? I'm being purposely facetious here, to show the flaw in your
                            > > argument. Although I grant that your suggestions are valid and based
                            > > on common-sense (and close to my own preferences, too), I do not agree
                            > > with your unwavering assertion that it is The One True Way.
                            >
                            > Amen, brother. I hope that Mark and others don't take offense, but I'm sure
                            > everyone has noticed that most software developers have a pretty healthy ego
                            > and want to do things their own way. Herding cats is easier than reaching a
                            > consensus among a team of developers of any size greater than two unless
                            > someone lays done the law, which really isn't a consensus. Then try
                            > enforcing the law!
                            >
                            >
                            >


                            [Non-text portions of this message have been removed]
                          Your message has been successfully submitted and would be delivered to recipients shortly.