Advantages of the editor
One of the main features of Ace is the syntax highlighting of all popular programming languages + it highlights modx tags and Fenom syntax. This is very important for those who work with code, as it makes it easier to navigate it and find errors faster. In addition, Ace has the ability to autocomplete code for snippets and MODX properties, which also significantly speeds up the development process.
Other advantages of Ace:
- There is a search and replace of text, with support for regular expressions.
- Built-in Emmet out of the box – layout accelerator.
- Ability to work in full-screen mode.
- Support for huge documents (up to four million lines!).
- Drag and drop dragging of text (code).
- Automatic indents when editing.
- Highlighting of parent tags.
- Multicursors and multi-selection.
- Code folding.
- Ability to display invisible characters.
- Soft and hard tabs.
- Many themes.
Installation
Ace can be downloaded from the MODX Revolution Manager via the Package Management section: from both the main repository and the modstore repository.
You can also download the transport package from the MODX repository here: https://extras.modx.com/package/ace.
Development and Bugs
Ace is hosted and developed on GitHub, and can be found here: https://github.com/danyaPostfactum/modx-ace
You can report bugs here: https://github.com/danyaPostfactum/modx-ace/issues
Configuring the Ace code editor
System settings > Namespace “ace”:
The add-on doesn’t have many settings, and the default ones will suit many people. Click on the plus sign next to the setting to find out what it is responsible for.
An example of my settings on one of my projects:
- Font size: 16px
- Editing area height: 560
- Invisible characters: Yes
- Soft tab: No
- Tab size: 2
- Editor theme: tomorrow_night
- Line wrap: Yes
You can see what the themes look like (and how they highlight the code) here: https://ace.c9.io/build/kitchen-sink.html
Additional useful information on editor
Hotkeys for AceTesting themes for ACE online.
Cheat sheet on emmet.
Testing emmet online.