Home Download Buy Blog Forum Support

tmLanguage - highlighting nth word differently

tmLanguage - highlighting nth word differently

Postby TheSHEEEP on Tue Oct 15, 2013 12:23 am

Hey, I have the following line in a script file of the Ogre material script language:

texture_ref mrt_gbuffer Deferred/GBuffer mrt_gbuffer_out

Now, what I want to do is highlighting the first word "texture_ref" in one color, the second and final words in a second color and the third word ("Deferred/GBuffer") in yet another color.
Here is my rule so far:

Code: Select all
            <string>Texture Reference</string>

It does nothing but highlight the first word correctly, as I have no idea how I can highlight single words at the nth position.

Also, I'm using ST3, if that makes a difference.

Yes, I know I can use JSON, but all that saving JSON to PLIST, then saving under a different ending, then repeating all the time when doing minor changes just got on my nerves so I'm now sticking to XML.
Posts: 1
Joined: Tue Oct 15, 2013 12:13 am

Return to Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests