Home Download Buy Blog Forum Support

Bracket / parenthesis highlighting question

Bracket / parenthesis highlighting question

Postby oats on Tue May 18, 2010 8:38 pm

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?
oats
 
Posts: 101
Joined: Mon Nov 09, 2009 4:39 pm

Re: Bracket / parenthesis highlighting question

Postby tgkeul on Wed May 19, 2010 6:39 am

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 :
Code: Select all
<?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>
[...]
tgkeul
 
Posts: 140
Joined: Tue Dec 02, 2008 9:35 pm

Re: Bracket / parenthesis highlighting question

Postby oats on Thu May 20, 2010 4:52 pm

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.
oats
 
Posts: 101
Joined: Mon Nov 09, 2009 4:39 pm

Re: Bracket / parenthesis highlighting question

Postby tgkeul on Fri May 21, 2010 6:48 am

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

This will do it:
Code: Select all
[...]
<plist version="1.0">
    <dict>
        <key>settings</key>
        <array>
            <dict>
                <key>settings</key>
                <dict>
                    <key>brackets</key>
                    <string>#FF00FF</string>
[...]
tgkeul
 
Posts: 140
Joined: Tue Dec 02, 2008 9:35 pm

Re: Bracket / parenthesis highlighting question

Postby oats on Fri May 21, 2010 2:17 pm

indeed you are correct! beautiful!
thanks for the help,
and thanks again jon for such a great tool!
oats
 
Posts: 101
Joined: Mon Nov 09, 2009 4:39 pm

Re: Bracket / parenthesis highlighting question

Postby sc0rp10 on Fri Oct 01, 2010 2:32 pm

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?
sc0rp10
 
Posts: 11
Joined: Fri Oct 01, 2010 2:27 pm

Re: Bracket / parenthesis highlighting question

Postby jps on Fri Oct 01, 2010 11:00 pm

Sorry, there's no option for this - only the colour can be customised at present.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Bracket / parenthesis highlighting question

Postby amndalb27 on Tue Oct 19, 2010 8:03 am

thanks for all your replies :)
amndalb27
 
Posts: 3
Joined: Thu Oct 14, 2010 12:39 pm


Return to General Discussion

Who is online

Users browsing this forum: prmaple and 13 guests