Sublime Forum

[Solved] How to unbold a bolded sublime text theme scope?

#1

How to unbold a bolded sublime text theme scope?

I have third part syntax, (the default sublime text 3 C++ syntax), and there is defined the scope:

keyword.control.import.include.c++
meta.preprocessor.include.c++

And on my theme there is this, which bolds it:

    <dict>
        <key>name</key>
        <string>Keyword Common</string>
        <key>scope</key>
        <string>keyword.control</string>
        <key>settings</key>
        <dict>
            <key>fontStyle</key>
            <string>bold</string>
            <key>foreground</key>
            <string>#0000FF</string>
        </dict>
    </dict>

But I do not want to bold keyword.control when there is also the scope meta.preprocessor. Something like this:

    <dict>
        <key>name</key>
        <string>Preprocessor</string>
        <key>scope</key>
        <string>meta.preprocessor</string>
        <key>settings</key>
        <dict>
            <key>fontStyle</key>
            <string>unbold</string>
            <key>foreground</key>
            <string>#804000</string>
        </dict>
    </dict>
0 Likes

#2

While writhing this I solved it:

        <key>fontStyle</key>
        <string>unbold</string>

It is working for unbold what is bolded.

0 Likes

#3

While you solved your problem, that isn’t how you should do it.

Instead use an empty string as value:

<key>fontStyle</key><string/>
4 Likes