Home Download Buy Blog Forum Support

How to change indicator for parentheses match highlighting?

How to change indicator for parentheses match highlighting?

Postby adelbertc on Mon Aug 13, 2012 6:04 am

Hello,

Just recently purchased Sublime Text 2, loving it so far, amazing, love the Vim bindings support and the UI, just one thing I noticed is that when indicating which parentheses match up with which, the indicator seems to be by default a subtle underline - is it possible to change this to something more noticeable like a highlight or a color change?

Thanks!
adelbertc
 
Posts: 3
Joined: Mon Aug 13, 2012 6:02 am

Re: How to change indicator for parentheses match highlighting?

Postby rgidney on Mon Aug 13, 2012 8:21 am

In the theme file, such as Monkai, you have the following to control this:
bracketsForeground
bracketsOptions
bracketContentsForeground
bracketContentsOptions
tagsForeground
tagsOptions

xxxForeground controls the color of the underline and text, while xxxOptions contains a space separated list of flags, which may be 'underline' and 'foreground'. 'underline' will show an underline, while 'foreground' will show the text itself in a different color.

'bracketsXXX' is used when the caret is next to the brackets, while 'bracketContentsXXX' is used when the caret is between brackets. If you set all the bracketsXXX and bracketContentsXXX keys to the same value, then there will be no visual difference between having the caret next to a bracket or not.
rgidney
 
Posts: 26
Joined: Wed Feb 29, 2012 11:58 am

Re: How to change indicator for parentheses match highlighting?

Postby adelbertc on Mon Aug 13, 2012 4:59 pm

Ah got it - now.. where does one usually find said "theme file?" :D (I use Solarized Dark is that's any help)
adelbertc
 
Posts: 3
Joined: Mon Aug 13, 2012 6:02 am

Re: How to change indicator for parentheses match highlighting?

Postby rgidney on Mon Aug 13, 2012 5:54 pm

For Windows XP: C:\Documents and Settings\[user name]\Application Data\Sublime Text 2\Packages\Color Scheme - Default\Solarized (Dark).tmTheme
For Windows 7: C:\Users\[user name]\AppData\Roaming\Sublime Text 2\Packages\Color Scheme - Default\Solarized (Dark).tmTheme
For OS X: /users/[user name]/Library/Application Support/Sublime Text 2/Packages/Color Scheme - Default/Solarized (Dark).tmTheme
rgidney
 
Posts: 26
Joined: Wed Feb 29, 2012 11:58 am

Re: How to change indicator for parentheses match highlighting?

Postby adelbertc on Tue Aug 14, 2012 1:16 am

Hm.. can't seem to find any of the options in the Solarized (Dark) theme file.. is it possible it doesn't have that option?

Help?
adelbertc
 
Posts: 3
Joined: Mon Aug 13, 2012 6:02 am

Re: How to change indicator for parentheses match highlighting?

Postby rgidney on Tue Aug 14, 2012 8:59 am

They are options specific to sublime and most themes were written for textmate. If you look at the Monokai theme you will see the options and formats, copy them to your theme and change colors and options as you wish.

Note that foreground refers to the color of the brackets themselves and not the text between the brackets. My settings are as follows:

<key>bracketsForeground</key>
<string>#91FF00</string>
<key>bracketsOptions</key>
<string>underline foreground</string>

<key>bracketContentsForeground</key>
<string>#91FF00</string>
<key>bracketContentsOptions</key>
<string>underline foreground</string>

<key>tagsForeground</key>
<string>#91FF00</string>
<key>tagsOptions</key>
<string>stippled_underline</string>
rgidney
 
Posts: 26
Joined: Wed Feb 29, 2012 11:58 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], subhaze, Yahoo [Bot] and 11 guests