Don't mix spaces and tabs for indentation

Anonymous avatarAnonymous 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

    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
    excanvas.js
    jquery.jqplot.js
    plugins/jqplot.barRenderer.js
    plugins/jqplot.canvasAxisLabelRenderer.js
    plugins/jqplot.canvasAxisTickRenderer.js
    plugins/jqplot.canvasTextRenderer.js
    plugins/jqplot.categoryAxisRenderer.js
    plugins/jqplot.cursor.js
    plugins/jqplot.dateAxisRenderer.js
    plugins/jqplot.dragable.js
    plugins/jqplot.highlighter.js
    plugins/jqplot.logAxisRenderer.js
    plugins/jqplot.ohlcRenderer.js
    plugins/jqplot.pieRenderer.js
    plugins/jqplot.trendline.js
    
  3. Chris Leonello

    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

    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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.