Home Download Buy Blog Forum Support

Can I have different font for certain file types?

Can I have different font for certain file types?

Postby cutcopypaste on Tue Sep 10, 2013 4:34 am

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.
cutcopypaste
 
Posts: 41
Joined: Tue Feb 21, 2012 9:43 pm

Re: Can I have different font for certain file types?

Postby skuroda on Tue Sep 10, 2013 5:03 am

Don't know much about fonts, but you can create syntax specific settings in ST3 also. Go to Preferences -> Settings - More -> Syntax Specific - User.
skuroda
 
Posts: 685
Joined: Fri Oct 05, 2012 8:11 am

Re: Can I have different font for certain file types?

Postby GrantSP on Wed Sep 11, 2013 2:14 am

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.
GrantSP
 
Posts: 39
Joined: Sat Aug 31, 2013 5:11 am

Re: Can I have different font for certain file types?

Postby cutcopypaste on Wed Sep 11, 2013 2:16 am

Ah I see that.. will have to find some documentation on how to use it to see if it's possible
cutcopypaste
 
Posts: 41
Joined: Tue Feb 21, 2012 9:43 pm

Re: Can I have different font for certain file types?

Postby cutcopypaste on Wed Sep 11, 2013 2:49 am

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.
cutcopypaste
 
Posts: 41
Joined: Tue Feb 21, 2012 9:43 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 22 guests