Sublime Forum

One document, one or several 'Syntax(es)' possible?


In a document, using ‘View | Syntax’ you can only select one from a list, or are there also possibilities to select several?

As an example. I have a document that describes a ‘Java’ program and an ‘HTML’ program. How can I use ‘View | Syntax’ to select the correct ‘Syntax’ for both programs? So I have three different sections in my document; a text section, a ‘Java’ section and an ‘HTML’ section.



Syntaxes can include each other, so you’d have to create a custom syntax that can identify each section of your document and apply the right syntax. Otherwise Sublime Text would have no way of knowing when to apply each syntax.



OK, then I will have to work on it myself. Thanks for your reply.