Home Download Buy Blog Forum Support

Syntax color

Syntax color

Postby stefanz on Thu Sep 20, 2012 2:25 pm

Hello everybody,

I have been using Sublime for more about 6 months, when also I bought it. I usually use it for front-end development, mainly editing css, html, jquery files.
I want to know how to add certain color to new css3 elements so box-sizing: border-box; will look like cursor : pointer; (see image attached or this link http://screencast.com/t/7Q7C0gVatE)

PS : Sorry if this topic was discussed, i looked for but without result
PPS : I use theme Monokai, if this matters.
2012-09-20_1713.png (5.34 KiB) Viewed 1406 times
Posts: 2
Joined: Wed Oct 26, 2011 2:09 pm

Re: Syntax color

Postby ChadW on Thu Sep 20, 2012 8:24 pm

You have to deal with two things:
  1. How the text is marked by the language highlighter, defined in the appropriate .tmLanguage (look in the Packages/Language)
  2. How that marking is colored by your color scheme (look in Packages/Color Scheme)
You can create your own color schemes, so feel free to copy Monokai under a new name and hack away.

With respect to highlighting, you get to go on an adventure of self-discovery in the XML highlighting format (I stick as much as possible to guillermooo's mighty fine AAAPackageDev Package, but you'll probably have to hack right on the XML). For example, the "cursor" token looks to highlight as "support.type.property-name.css". There's a whole system of hierarchical naming; there is decent documentation for this (though note you may have to correlate some of it from the TextMate documentation).
Posts: 21
Joined: Fri Sep 23, 2011 7:45 pm

Re: Syntax color

Postby stefanz on Wed Oct 31, 2012 5:11 pm

I found a plugin that solves my problem https://github.com/i-akhmadullin/Sublime-CSS
Posts: 2
Joined: Wed Oct 26, 2011 2:09 pm

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], Yahoo [Bot] and 19 guests