Sublime Forum

Front end developer's color theme

#1

As a Front end developer I often work with html files with blocks of backend code in them. It could be Php, Asp, Perl or whatever. Usually these blocks within html code are separated with something like <? ?> or <% %>. It would be nice if there would be a way to (subtly) highlight these blocks in code using a different background color. That way it’s easy to spot these blocks in long files. Also JavaScript and CSS blocks are something that could be separated.

I attached here the default view of a file with a php extension and an example of what I mean. Obviously my colors are butt-ugly, but you get the idea.

I actually managed to achieve something like this on Dreamweaver some years ago, but even Dreamweaver stumbled on back end code within a element. (And Dreamweaver obviously is too heavy for fast development.)

What do you think, is this something that either could be achieved currently or could be developed?



0 Likes

#2

You can open the colorscheme (found in Preferences > Browse Packages > Color Schemes) in ST2. It’s a JSON file. Just add the scopes, for example: source.php, and the background color that you want.

0 Likes