change the font style only for attributes in MacVim

62 views
Skip to first unread message

a a

unread,
Apr 30, 2016, 8:29:01 AM4/30/16
to vim_use
I posted this on Stackoverflow,but didn't get any constructive info,so let me ask this question here.


I have the font called Operator Mono Light, and I am using it in Macvim.

My question is in Vim, can I get the font changed to the Italic version of Operator Mono only for attributes like in this picture?

If so, how can I do it?

Thanks for your help in advance.

qTKBI.png

Ben Fritz

unread,
May 2, 2016, 11:40:34 AM5/2/16
to vim_use

This is pretty simple, actually.

Find the colorscheme file you are using. If it is a personal colorscheme in your ~/.vim directory somewhere you can just edit it directly. If it's a system-installed one then you will need to make a copy first and put it in ~/.vim/colors.

HTML attributes are linked to the "Type" highlight group. So find the line that starts "hi Type" or "highlight Type" and modify it to include "gui=italic".

If such a line doesn't exist yet, just add one: "hi Type gui=italic".

Reply all
Reply to author
Forward
0 new messages