Search code examples
fontsthemestextmate2

How to set Font Style in a TextMate 2 theme?


I would like to do this:

settings = { fontStyle = 'italic'; foreground = '#E5A472'; }; },

But the font style is not changed.

What is the correct syntax to change font styles in a TextMate 2 theme?

I made changes to get to this:

{ name = 'Markdown Italic'; scope = 'markup.italic'; settings = { fontStyle = 'italic'; foreground = '#E5A472'; }; },

But no joy.


Solution

  • The scope selector is actually markup.italic.markdown not markup.italic.

       {    name = 'Markdown Italic';
            scope = 'markup.italic.markdown';
            settings = {
                fontStyle = 'italic';
                foreground = '#E5A472';
            };
        },
    

    This was originally hidden by my font not having italics at all. So ensure that your font has a Italic face.