Sublime Forum

Need some help in very simple syntax highlighting

#1

I need to create a very simple syntax highlighting which inherits from multiple installed syntax.

Main points of this new syntax is dead simple:
/* multi line comment */
// inline comment
#A {
// code in this block will be highlighted as language X
}
#B {
// code in this block will be highlighted as language Y
}

That’s all, please anyone help me to write this syntax highlighting, black-white color now is killing me.
Thank in advanced.

0 Likes

#2

docs.sublimetext.info/en/latest/ … xdefs.html

Use begin-end-pattern and define an include pattern in it, which includes your language X’s base scope.

0 Likes