Why can't I increase tab size?


#1

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:


#2

Hi.

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:

".python.source":
  editor:
    autoIndent: true
    autoIndentOnPaste: true
    scrollPastEnd: true
    softWrapHangingIndent: 2
    tabLength: 4 # <<<<< this for you might be set to 2

Regards.


#3

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


#4

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.


#5

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?


#6

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


#7

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


#8

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