Sublime Forum

tmLanguage vs sublime-syntax


i noticed that some plugins have both tmLanguage and sublime-syntax files. What is the reason for this? Are both files provided for backward compatibility and should i care about tmLanguage for new plugins?



tmLanguage is the legacy syntax definition type and sublime-syntax is the newer one. It has enhanced capabilities that tmLanguage doesn’t support, which is enhanced even more in Sublime Text 4.

Older packages would have only the older syntax definition type while ones created more recently (circa build 3092) would have the newer format, generally speaking.

At this point, the only reason to create a new syntax in tmLanguage format is if you want to share that syntax with some other editor that also supports tmLanguage syntax definitions. For use solely in Sublime, you want to use sublime-syntax files instead.