Import a TextMate Bundle
- In the Ace repository, navigate to the tools folder.
npm installto install required dependencies.
node tmlanguage.js <path_to_tmlanguage_file>;for example,
node <path_to_tmlanguage_file> /Users/Elrond/elven.tmLanguage
Two files are created and placed in 'lib/ace/mode': one for the language mode, and one for the set of highlight rules.
A Note on Accuracy
Your '.tmlanguage' file will then be converted to the best of the converter’s ability. It is an understatement to say that the tool is imperfect. Probably, language mode creation will never be able to be fully autogenerated. There's a list of non-determinable items; for example:
The use of regular expression lookbehinds
Deciding which state to transition to
While the tool does create new states correctly, it labels them with generic terms like
Many modes say something like
include source.c, to mean, “add all the rules in C highlighting.” That syntax does not make sense to Ace or this tool (though of course you can extending existing highlighters).
Rule preference order
Most likely, you’ll need to take keywords from your language file and run them through
However, the tool is an excellent way to get a quick start, if you already possess a tmlanguage file for you language.
Updated less than a minute ago