Since I haven’t found a post or announcement explicitly describing the differences between .sublime-syntax
and .tmLanguage
– is the YAML file simply a conversion from XML or is there more to it? Probably worth noting in the documentation!
Sublime Syntax
Yes, I’m aware of both pages and read them before (I didn’t read every post in the thread). I’m also aware of the possibility to convert these files within Sublime Text. Yet, that doesn’t answer my question. Is this a plain conversion that could be done with any XML2YAML converter?
sublime-syntax
extends tmLanguage
functionality, so you can convert from tmLanguage
to sublime-syntax
but not vice-versa. I’m not sure about any XML -> YAML converter, but it’s built in to ST: I’m sure in the Tools -> Developer menu when you have a tmLanguage
file open is an option to convert to sublime-syntax
.
I think you meant to say .tmLanguage
contains a subset of .sublime-syntax
functionality. Or .sublime-syntax
is a superset of .tmLanguage
.
Specific features in .sublime-syntax
that are not available as part of .tmLanguage
:
- The
set
directive - Pushing multiple contexts via a
push
orset
directive. (A singlepush
/pop
is equivalent tobegin
/end
.) - The
clear_scopes
directive - Variables
These are all mentioned in the docs, however we don’t specifically compare the two file formats.
There are a few things I need to clean up there, so I can probably add a high-level “differences” section.
Re-use matches in sublime-syntax