Insert tab after pressing enter


#1

I’d like atom to always keep a tab that was automatically inserted, after I press enter. So for example:

constructor()
{ //If I press enter here
}

The result will be:

constructor()
{
<–With an automatic tab here
}

But if I then press enter again, the result will be:

constructor()
{
<–Automatic tab gone
<–Automatic tab here
}

I’d like atom to not undo the tabs it inserts after I press enter. Sorry if that was presented very poorly, I just couldn’t think of how to effectively explain it.


#2

You can get this if you go into the settings for the whitespace package and check “Ignore Whitespace Only Lines”. Atom aggressively trims trailing whitespace in a few cases but you can turn it off.


#3

Life saver, that worked. Loving atom but that was one of a few little things that were annoying me.