Sublime Forum

Flat-file sintax highlighting

#1

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

0 Likes

#2

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

0 Likes