I have some probably basic questions regarding the development of syntax definitions for new languages (.sublime-syntax
files)
1: whhat’s the name, and where is located, the syntax used in .sublime-syntax
files? It seems to be a variant of the yaml syntax,but while I can locate the basic yaml syntax, I cannot find the specialised one. I ask because I’d want to tweak the specialised syntax to suit my workflow better.
2: I understand that push: and set: actions can be given a list of contexts. Does the list need to be given in the “one liner” format e.g. push: [a,b,c]
or can it be given as in
[code]push:
- a
- b
- c
[/code]
2.1: if I can use the second format to push or set a list of contexts, can one of the items in the list be an annonymous context defined in-place, e.g.
[code]push:
- a
- b
-
- match ‘something’
scope: newscope
[/code]
3: I understand that in any case, when pushing or setting a list of contexts, the last one in the list is processed first. Is there a way to reverse that behaviour? Specially if I can do as illustrated in 2.1 it’d help readability if the first element in the list (a) was processed first and it went top-down
- match ‘something’
4: What are the valid characters for contexts and variables names?
5: I understand that in standard yaml, when the value associated with a key is a list or dictionary NOT given in a single line, the leading whitespace to the first entry define the indentation for all the entries. Does this hold true for sublime-syntax format? Or do I need to stick to the two space of indentations always.
I want to do something like this:
variables:
#comment explaining first batch of variables
var1: text1
var2: text2
#comment explaining second batch of variables
var3: text3
var4: text4
in this way, I can fold and unfold different parts of the list of variables as I need.
Thanks you in advance for any answer you may provide!