Code-Editor Shortcode Reference

This topic contains 7 replies, has 2 voices, and was last updated by  Sebastian 1 week ago.

Author Posts

alphaprojekt

Hi hello,

MC seems to built on top of ‘ace editor’. Is there somewhere a shortcode reference just for the editor itself? I googled it, but couldn’t find anything.

I am asking, cuz recently I pressed ALT + 0 (zero) and it was code-folding. Very interessting for me.
Would be interessted in a shortcode for “Beautify code” šŸ™‚

Thank you, Roman


alphaprojekt

This one isn’t displaying anything : https://ace.c9.io/demo/keyboard_shortcuts.html
but here I’ve found some useful shortcuts : https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts


Sebastian

Hey Roman,

Thanks for sharing the wiki article.

There is a “Beautify code” option in Microthemer (see the 3 dots at the top left of the editor). It doesn’t tap into any native ACE functionality, so any shortcut would have to be added by me. You can see the list of taken Ctrl + Alt + [letter] shortcuts here (or in the Microthemer settings sidebar on the right).

I’d be happy to accommodate a keyboard request for beautifying the CSS.

Cheers,
Sebastian


alphaprojekt

Hi Sebastian,

Iā€™d be happy to accommodate a keyboard request for beautifying the CSS.

I’d take it. B and C are taken, so what about Ctrl + Alt + F (Format Code) – or any other letter you have in mind?

Cheers, Roman


alphaprojekt

Hey ho,

any news on that? A shortcut would come handy.

If its not possible – nor too much work, just drop that request.

Thank you! Roman


Sebastian

Hey,

Sorry for not getting back to you. I was probably trying to think of another letter and then got distracted. I feel Ctrl+Alt+F should probably be reserved for searching all MT folders. Looking at the keyboard it might have to be a bit random. Maybe Ctrl+Alt+O for “Organise code”?

Cheers,
Sebastian


alphaprojekt

Hey,

no worries.
Well, since I also use PHPStorm, the optimal binding (for me) would be STRG + ALT + L – but since you implement this, STRG + ALT + O should work also šŸ˜‰

Thank you!!! Roman


Sebastian

OK, it did try Crtl+Alt+L but it seems to clash with a native ACE editor keyboard shortcut and does nothing, whereas Crtl+Alt+O works, so I’ll go with that. It will be included in the next release.

Cheers!
Sebastian

You must login or register to reply to this topic.