How to set tab to always indent?


I basically never want to insert a tab character in my code except for indentation, so I like tab to always indent. I added this to my configuration:

  'tab': 'editor:indent-selected-rows'

However, this has problems:

  • I cannot indent an empty line
  • now in 1.4.0 I cannot select items from the completion box with tab or anything else

How should I configure it so I don’t have these problems?


The Tab key is one of the most used keys Atom. It’s used to expand snippets, select autocompletions and for indentation (and probably other things besides). As you’ve found out, tweaking with it can have unintended consequences. What you would probably have to do in order to get what you want is write some custom code and then ensure that the cascading of one function of the tab key to the next works the way you want. You should probably take a look at this section of the Flight Manual:

and then do some code spelunking into the snippets and autocomplete-plus packages to ensure you understand how everything fits together.