Sublime Forum

Bracket / parenthesis highlighting question

#1

Currently matching parenthesis are highlighted by a subtle underline. However, in the color scheme I use (Monokai), the subtle underline is too subtle, and actually hard to see if there is a line of text below the highlighted parenthesis.

Is there any option to change the color of the underline or perhaps make the matching parenthesis bold?

1 Like

For X: improve matching and find highlighting
#2

To change the colour of the underline you should be able to add an entry for meta.parens to the .tmTheme file, assuming your .tmLanguage file defines that (C does, for example)

Example from my tmTheme :

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>settings</key>
        <array>
            <dict>
                <key>name</key>
                <string>meta.parens</string>
                <key>settings</key>
                <dict>
                    <key>foreground</key>
                    <string>#FF8040</string>
                </dict>
                <key>scope</key>
                <string>meta.parens</string>
            </dict>
...]
0 Likes

#3

that did not work. it changed the color of some of my parenthesis, but did not change the underline color.

with some sleuthing (with the help of pixie), i am able to deduce that the underline color is equal to the average RGB value of the background color and the caret color. it would appear there is not independent control of this.

0 Likes

#4

You’re right! My notes were wrong, sorry.

This will do it:

...] <plist version="1.0"> <dict> <key>settings</key> <array> <dict> <key>settings</key> <dict> <key>brackets</key> <string>#FF00FF</string> ...]

0 Likes

#5

indeed you are correct! beautiful!
thanks for the help,
and thanks again jon for such a great tool!

0 Likes

#6

Hi. I have a similar problem, but I want to highlight the full area of the brackets, not just bottom border. How i make this?

1 Like

#7

Sorry, there’s no option for this - only the colour can be customised at present.

0 Likes

#8

thanks for all your replies :smile:

0 Likes