Change tabs to spaces?


I’m pretty new to Atom, but just recently I gave it a strong go, and damn, the git integration is so stellar. Probably the only thing keeping me from fully moving over from sublime is the fact that for some reason I can’t find out how to change tabs to spaces. I have soft tabs enabled, but this still produces tabs instead of spaces. Is there a vanilla way to do this or do I have to install some type of package for it?



There are commands built in. If you open the Command Palette and search for “whitespace”, you’ll see the two commands.

Also, to solve your tab problem, go to the Settings View and scroll down to “Tab Type”. You can change it from auto to soft and then it will always insert soft tabs.


For some reason this doesn’t work for me, I’ve restarted Atom and removed/readded the project to atom, but it still doesn’t work. I also have editorconfig set to use spaces, but it wasn’t working for me before I added that plugin. Any suggestions?


Did you try closing all the open files and reopening them?


Yeah, still nothing, is there nothing else I should be setting?


Nope, those are the settings. Can you reproduce the issue in Safe Mode?

To launch Safe Mode:

  1. Completely exit all instances of Atom
  2. Launch Atom with the command atom --safe


I launched it in safe mode and it’s still using tabs, settings are the same.


Can you turn on “Show Invisibles” and make sure they are actually tabs?


Sure, seems like they are.


¯\_(ツ)_/¯ So if you:

  1. Have “Soft Tabs” enabled
  2. Have “Tab Type” set to “soft”
  3. Launch Atom in Safe Mode
  4. Replace all tabs with spaces
  5. Save the file
  6. Open the file

When you type new lines, it inserts tabs?


Yeah, it still does tabs, if I go to the end of a line, however, and tab, it’ll give me spaces.


I can’t reproduce the behavior you’re seeing. I’ve got one last thing to try:

  1. Close all open files
  2. Close all instances of Atom
  3. Execute the command: mv ~/.atom/storage ~/.atom/storage-backup
  4. Launch Atom with atom --safe