Specific syntax-based font_face in Sublime Text 2

Is it possible to display a specific font_face for each individual syntax language in Sublime Text 2? For instance:

"php" : { "font_face" : "Droid Sans Mono" }, "c#" : { "font_face" : "Courier New" }, "javascript" : { "font_face" : "monospace" } 

Could not find much information about setting font_face in ST2, except how to change it globally. My work requires me to skip many different language files and think that this will make them easier to recognize on the fly. I like my color scheme, and I want to keep it the way it is, but, unfortunately, it is not completely different so that I can quickly select languages.

+4
source share
2 answers

For special syntax settings for the target language, in the Packages > User folder, create a file with the name of this language.

ex. for PHP , create php.sublime-settings .

and add the following code to it:

 { "font_face": "Source Code Pro" } 

For JavaScript create JavaScript.sublime-settings file names, etc.

In addition, using this method, you can set different color schemes for different languages ​​using the color_scheme attribute.

 { "font_face": "Source Code Pro", "color_scheme": "Packages/Theme - Flatland/Flatland Monokai.tmTheme" } 

Alternatively, if the target language file is open, you can go to Preferences > Settings - More > Syntax Specific - User and add the font_face parameter.

+3
source

If you go to Preferences > Settings - More > Syntax Specific - User , you can add

 { "font_face": "Source Code Pro" } 

to have this font for this syntax only.

+5
source

All Articles