How to auto-indent code in the Atom editor?

I found the option in the menu, under Edit > Lines > Auto Indent. It doesn’t seem to have a default keymap bound.

You could try to add a key mapping (Atom > Open Your Keymap [on Windows: File > Settings > Keybindings > “your keymap file”]) like this one:

'atom-text-editor':
  'cmd-alt-l': 'editor:auto-indent'

It worked for me 🙂


For Windows:

'atom-text-editor':
  'ctrl-alt-l': 'editor:auto-indent'

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)