Sublime Forum

Can I have different font for certain file types?

#1

I want .md and .txt files to have a more readable font, while other types continue to be fixed with.

Is there a way to do this in Sublime Text 3? I have seen references online to User File Types preferences, but it doesn’t seem to be in ST3, nor do quite what I’m after.

0 Likes

#2

Don’t know much about fonts, but you can create syntax specific settings in ST3 also. Go to Preferences -> Settings - More -> Syntax Specific - User.

0 Likes

#3

There are within settings the ability to set font faces and sizes so I thought I might try and use them in the syntax settings, but with no luck.
I also have the Apply Syntax plugin so I thought it might work there, no luck.

It should be a relatively easy plugin to create though, I would think.

0 Likes

#4

Ah I see that… will have to find some documentation on how to use it to see if it’s possible

0 Likes

#5

I edited went to Preference -> more -> syntax specific. it made a file called plain text.sublime-settings. I put in:
{
“font_face”: “Proxima Nova Regular”,
“line_padding_top”: 2,
“line_padding_bottom”: 2,
“wrap_width”: 80,
}

and it seems to be applying. Though if I set font-size it overrides even zoom, so that wasn’t helpful… but font face works!

Just wish I could make wrap width an absolute value or percentage instead of number of characters.

0 Likes