Home Download Buy Blog Forum Support

flat-file sintax highlighting

flat-file sintax highlighting

Postby lehphyro on Tue Nov 26, 2013 1:42 pm

Hi all,

Does anyone know a plugin/tmLanguage file that highlights individual fields in flat-files? What I'd like is something like this:

Given: 0192829TESTABC
Sublime shows 01 in red, 92829 in green, TEST in blue and ABC in grey for example.

If there isn't anything like this available, I'd be happy if you could give me some directions to get this result. I got a simple tmLanguage file working but I don't know how to get the colors the way I want.

Thank you
lehphyro
 
Posts: 1
Joined: Tue Nov 26, 2013 1:36 pm

Re: flat-file sintax highlighting

Postby quodlibet on Tue Nov 26, 2013 2:29 pm

The colors depend on your color scheme (*.tmTheme) and the scope of the syntax file (*.tmLanguage). If your theme colors the scope "keyword" red (for example), then you could use that "keyword" as the scope in your tmLanguage for "01".

To simplify my life I use add "color.red", "color.blue", etc. in my own tmTheme. But there is no convention for this that I know of.

All in all, the process is a little messy.

Alex
quodlibet
 
Posts: 547
Joined: Sat Jun 18, 2011 5:53 pm


Return to General Discussion

Who is online

Users browsing this forum: pgrippi and 26 guests