I would like to apply certain syntax rules inside a block defined by “–text”:
--text
Formatted text
--
Other text
--form
Other text
--
I have seen that push and pop are considered overcomplex in ST4. And I would prefer to have all the rules inside the same .sublime-syntax file, not using embed to reference an external file.
I tried this but it does not work 
- match: ^--text$
scope: myblock
escape: (?=--$)
myblock:
- match: [a-zA-Z]
scope: charstyle
- match [0-9]
scope: digitstyle
But it gives an idea of what I am trying to do. Just define like a “context” to define new rules that apply only inside that context. The --text trigger is only for the block, but the escape symbols can appear in some other parts of the document.
How can I achieve this? Thanks!