Sublime Forum

Background per language

#1

Hello,

I’d like to ask about possibility of change background per language.

I mean something like this:

Like you see, background for php is different than html

0 Likes

#2

I will answer myself because i found the solution :slight_smile:
Maybe it will be helpful for other coders.

If you need to get this effect, you have to edit your color scheme and add scope like this:

"rules":
[
	{
		"name": "PHP Background",
		"scope": "source.php",
		"background": "var(grey)"
	}
]
2 Likes

#3

For what it is worth, I think you might be better served by changing the scope to a more general, but hierarchical value, like "source source, text source, source text". This will make all-PHP files have the normal background, but nesting of any language (say, CSS in HTML for example) will get that background effect.

1 Like