A shortcut for formatting the file content or a portion of code


#1

I have not found this feature, is it planed ?


#2

So far there seem to be a few plugins starting to address this. Personally I would like to see a lot more work on this front, I use this functionality quite a lot for javascript and html formatting.


#3

a basic version can be made by putting this in your keymap file:

'.editor:not(.mini)':
  'alt-cmd-l': 'editor:auto-indent'

Auto-indent key binding?
How can I see formatted code?
#4

Thanks Agos, exactly what I needed!


#5

Solution by Agos is for Mac, the Keymap code including also Linux/Windows would be:

'.editor:not(.mini)':
  'alt-ctrl-l': 'editor:auto-indent' # for Linux/Windows
  'alt-cmd-l': 'editor:auto-indent' # for Mac