Sublime Forum

Mixed files types

#1

Is it possible to create plugins/snippits that would support two types of code in one file.

In my specific example, I want to do some literate programming using noweb: the file would be a mix of Latex and C++. The question would then be, can you tell Sublime that this extent of text should use Latex specifications and that extent of text should C++ specifications (as delimited by noweb)?

Would I have to merge say the Latex specification w/ the C++ specification w/ some noweb tossed into the mix?

I did see the bit on using sweave/R with TextMate, but that seems sweave specific.

Any hints, pointers tips appreciated.

0 Likes

#2

In your tmLanguage file, you can refer to other grammars. For example, the HTML file references the Javascript file. I’d recommend looking at how that’s done.

0 Likes