Why can't I increase tab size?


The default tab size in Atom is 2, and I increased it to 4, but the change doesn’t seem to take effect. Here are screenshots:

And how it looks in a file:



Have a look at the configuration file of Atom (config.cson). You might have a configuration relating to the language that specifies the tab size.

Reach this file by menu FILE - CONFIG. typically you could have something like:

    autoIndent: true
    autoIndentOnPaste: true
    scrollPastEnd: true
    softWrapHangingIndent: 2
    tabLength: 4 # <<<<< this for you might be set to 2



Hey. Thanks for the reply @danPadric
I checked my config.cson file, and tabLength: 4 is set. Here’s a screenshot:

And here’s the entire file: https://pastebin.com/BBQjpBiN


I notice that you’re using variable-width font with pretty slim spaces. To me, it looks like there are four spaces in each level of indentation.


Two things. First, I changed the indent level to 100, still no change. And secondly, The change only doesn’t happen when I add the KES folder as a project. Otherwise it works. When I add KES, It asks me to restore the saved state, and if I do the indent level goes back to 2.

Anyway, I just changed the name of the folder and it didn’t ask me anything, but is there any package that can change all the tabs that I used from 2 spaces to 6 spaces?


So you should make sure that you don’t have any unsaved files, then you should tell it to not restore.


I don’t have unsaved files, and there isn’t an option to not restore


Try closing Atom entirely and opening it with atom --clear-window-state.