Atom editor indent : annoying behavior with tab key in middle of "empty" line



Pressing tab key in the middle on a line containing only spaces, will add one “indentation” to the end of line then place caret at the end of line.
This is annoying for me because when the indentation on the line is already ok, the tab press will add a new tab at the end of line.
I expect the following behavior:
When pressing tab key in the middle of line, if no word characters after that, just place the caret at the end of line without adding indentation. If word character present, just add spaces at the caret place.

Here short gif showing why it’s annoying :

What is the options/parameters to have my expected behavior ?


There aren’t configuration options to make the tab key work exactly the way you describe. You could write some code yourself to create the behavior you want and set the tab key to behave that way though.