Home Download Buy Blog Forum Support

Mixed files types

Mixed files types

Postby bernied on Tue Jun 25, 2013 6:19 pm

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.
bernied
 
Posts: 1
Joined: Tue Jun 25, 2013 6:03 pm

Re: Mixed files types

Postby adzenith on Tue Jun 25, 2013 7:53 pm

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.
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 14 guests