Sublime Forum

Syntax color

#1

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.

0 Likes

#2

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).

0 Likes

#3

I found a plugin that solves my problem github.com/i-akhmadullin/Sublime-CSS

0 Likes