Bob Rockefeller
Bob Rockefeller

Reputation: 4616

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.

Upvotes: 2

Views: 2445

Answers (1)

Graham P Heath
Graham P Heath

Reputation: 7399

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.

Upvotes: 2

Related Questions