Convert code in Atom editor?

I want to try Atom editor and install it, install atom beautify also to reformat php / html / js code. But I can't find the shortcut and I don't understand how to use it. I want to mark all the code and click the shortcut and reformat it (like most IDEs). Any ideas?

+3


source to share


1 answer


You can invoke the auto indent command from the Command Palette, cmd-shift-p

or you can follow these instructions to bind your keys:

A bright combination for formatting the contents of a file or a piece of code can be done by placing it in your map file:

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

      



You can try to add a keymap (Atom> Open Your Keymap [on Windows: File> Settings> Keys> "your keyfile file"]) like this

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

      

Now ctrl-alt-l will be your shortcut after installation

+2


source







All Articles