1. Chris Leonello
  2. jqplot
Issue #116 resolved

Don't mix spaces and tabs for indentation

Anonymous created an issue

Please use either all spaces or all tabs. Any combination of the two will not indent correctly unless my editor uses the same tab width as yours.

Comments (9)

  1. Chris Leonello repo owner

    Can you provide specific files where this is the case. I try to use 4 spaces exclusively. Only exception I can think is other open source code that I have included verbatim. Let me know where you're seeing this and I'll fix.

  2. John Firebaugh
    $ grep -l '^ *\t' *.js plugins/*.js
  3. Chris Leonello repo owner

    Hmm, the same grep on my system shows tabs in nearly every file. Even more interesting, the regular expression searching in BBEdit and TextMate show an even different set of files.

    I'll see if I can figure out what is going on.

  4. jlcheng
    • changed status to open
    • marked as bug

    The following html files still use mix of tabs and spaces.

    examples/axisLabelsRotatedText.html examples/axisLabelsRotatedText2.html examples/barLinePieStack.html examples/categoryHorizontalBar.html examples/dataTracking.html examples/fillToZero.html examples/hiddenPlot.html examples/markerStyles.html examples/multiAxesRotatedText.html examples/resizablePlot.html examples/rotatedTickLabels.html examples/rotatedTickLabelsZoom.html examples/simulateMutipleBarColors.html examples/stackedBar2.html examples/stackedBarCategoryVsLinearAxes.html examples/stackedLine.html examples/test.html examples/zoom1.html examples/zoomProxy.html

  5. Anonymous

    Hi Chris,

    I am brand new to jqPlot and very much appreciate your work. This issue is definitely a highly preferential thing so I agree it should definitely be filed under proposal and be weighted very low as far as importance goes.

    At any rate, just to throw in my 2 cents on the issue, I actually find that I prefer tabs to spaces for my projects because I work with people would like a 4-space indent while others like 2-space or 3-space. With personal preference being something I prefer to not get into too much of an argument about, I go with tabs so that each individual developer on the project can set their tab stop in their favorite editor to whatever they prefer.

    Also, in other uncompiled, html, and furthermore inferior non-minifiable languages, I find tabs to be better since it only costs 1 byte per tab in file size versus 4 bytes for 4 spaces.

    All that being said, please feel free to completely ignore my comments if you see fit because, after all, this is your project and you can format the files however you see fit.

    Regards, Patrick

  6. Chris Leonello repo owner

    Thanks for the comments, Patrick.

    I don't care much one way or the other for tabs/spaces although you have a couple of good points about using tabs. I seem to use spaces by default only because I do a lot of python programming (where indentation has programmatic significance).

    The code base started out with 4 spaces indent, so I'm not going to change in the foreseeable future. I'll clean up the tabs where I can as time permits.

  7. Log in to comment