Config help - tabs vs spaces, auto indent


#1

I want to use tabs instead of spaces for auto indent. I have the following settings set and yet Atom keeps inserting tabs for auto indent:

✓ Auto Indent
✓ Soft Tabs
Tab Length: 4
Tab Type: Soft

What else can I check?


#2

These two sentences are contradictory. Do you want tabs or not?


#3

That is true. I want to use spaces.

At this point I’m not sure that Atom is using tabs. Yesterday I was sure that copy-pasting a new auto-inserted soft tab would result in a single space being copy-pasted. There were also some mysterious things in split-diff. It seems to be four spaces now. Maybe I just needed a restart.

I was also thrown by the fact that using left arrow key at the end of an inserted soft tab goes back to the beginning of the line. Pressing backspace also deletes the entire soft tab. I’m kind of curious as to how that happens. Does Atom just parse blocks of 4 spaces as single entities for the purposes of arrow navigation and backspace? I guess it must do that, since the alternative would be to store some invisible characters marking the boundaries of a soft tab.


#4

Atom knows how many spaces you’re using and it makes navigation easier by skipping over the ones in the middle of each “tab”.


#5

Sounds like it is using soft tabs (you can confirm by toggling invisibles: window:toggle-invisibles). If you don’t like the backspace-deletes-the-whole-tab behavior, disable it by unchecking the “Atomic Soft Tabs” option in Settings -> Editor.