#243 Default tab width 4 (de facto standard)

Jari Aalto

Cf. Debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343462

Please let me know if the default could be chnaged to
standard "4", which is nicely half-tab.


Package: joe
Version: 3.1-0.2
Severity: wishlist

Initially, I was happy to see that people picked up the project. Now I'm deeply disappointed. (...) at all by totally f**king up the tab handling, and even worse, SETTING A 2-COLUMN TAB STOP by default. As Linus once explained in the kernel hacking docs, this is like redefining Pi to 3.14.


  • Jan Engelhardt

    Jan Engelhardt - 2008-11-08

    Not quite. The standard should be a TAB, and 1 of it. Not 4 spaces, not 2 spaces. Countless discussions were done on LKML about this too, with the end rationale that TABs are used for logical indentation, and they have the benefit that you can change their apparent width (width they appear with), which makes it so vastly superior to tabs when used correctly.

    -istep 1
    -indentc 9

    For at least ASM, AWK, C, CSH, CSS, HTML, Java, JSF, m4, Perl, PHP, Python, sed, sh, spec, tex, troff and XML.

  • Jari Aalto

    Jari Aalto - 2008-11-08

    The question was not the hard tab, but "indentation" for the code. Naturally the keyboard key TAB produces a \t character.

    All IDE editors use concept of TAB-key to avance certain amount, according to the default "level" of indentation.

    As for the LKML, the have settled to indenation of hard-tab, \t, (8 characters forward), which is not the typical use in released Open Source software and therefore isn't suitable for basis for typical programming. The compromise is half-tab, which seems to work bets with any programming language. It also naturally advances to full-tab in after 2 steps.

    There are also 2-step indentations, but a highly indented 2-step code can suffer from legibility (small screen, not perfect eye sigh, printing 4-by-4 paper....).

  • Jari Aalto

    Jari Aalto - 2010-12-20

    The Linux Kernel Development style is minority. As is the GNU C coding style. They are not much used outside of those circles. Majority seems to use half-tab, i.e. 4 spaces, which is good for print, screen, with variety of fonts and screen resolutions.

    Whether multiple indents are converted to tabs or spaces is another matter entirely. An interesting read is "Tabs versus Spaces: An Eternal Holy War" by Jamie Zawinski <jwz@jwz.org> http://www.jwz.org/doc/tabs-vs-spaces.html

    Projects that deviate frm 4, can set their defaults to use 2 (Ruby) or 8 (Kernel devs), but for program startup it should be 4, as the original bug report expressed.

  • John J. Jordan

    John J. Jordan - 2015-03-13


  • Joe Allen

    Joe Allen - 2015-03-16

    These days I prefer 8 (single tabs). It has certainly evolved over the years. I had preferred just 1 space indents when I was younger.

    Anyway, I've changed to 4 spaces with [cbea11]. Also I've added a menu to allow changing istep and indentc to common values quicker: ^T = <1, 2, 4 or 8 for tabs>

    I had forgotten that 1 and 0 in menus forced a definitive on or off of the selected option. I've changed this to + and - since I want to use 1 in the menu.



    Commit: [cbea11]

  • John J. Jordan

    John J. Jordan - 2015-03-24
    • status: open --> closed-fixed
    • assigned_to: Joe Allen
    • Applies To: --> v3.7
    • Group: --> v3.8

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks