Ace editor enable emmet for twig mode
-
21-12-2019 - |
Question
I'm using Ace Editor with emmet
enabled. The following works fine, as expected:
var editor = ace.edit("editor");
editor.session.setMode("ace/mode/html");
editor.setOption("enableEmmet", true);
But if I change the mode to:
editor.session.setMode("ace/mode/twig");
It doesn't work anymore. Is there any way to make Emmet work in ace/mode/twig
?
Solution
You can add twig
to the regexp at https://github.com/ajaxorg/ace/blob/v1.1.5/lib/ace/ext/emmet.js#L391
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow