How to change style of matched brackets in Sublime Text 2 / 3

sublimetextsublimetext2sublimetext3

It's just underlining the matched brackets, Is it possible to make it more useful like changing brackets colour or highlighting the line of brackets?

Best Solution

You can change the color of the brackets modifying your theme's color scheme file.

Go to Preferences / Browse packages open folder Color Scheme - Default find out your current theme file (default's Monokai.tmTheme). Open it using Sublime Text and find the following part:

<key>bracketsForeground</key>
<string>#F8F8F2A5</string>
<key>bracketsOptions</key>
<string>underline</string>

<key>bracketContentsForeground</key>
<string>#F8F8F2A5</string>
<key>bracketContentsOptions</key>
<string>underline</string>

Here you can change the appearance of your brackets. If you change it to something like this:

<key>bracketsForeground</key>
<string>#FF8000</string>
<key>bracketsOptions</key>
<string>foreground</string>

<key>bracketContentsForeground</key>
<string>#FF8000</string>
<key>bracketContentsOptions</key>
<string>foreground</string>

..you'll remove the underline and add an orange color to your brackets.

Take a look to the rest of the file because (maybe) you'll find something more to change ;)

There's no need to restart sublime to see the changes. Just save the file.

Update for Sublime Text3

  1. Go to your Sublime Text 3 installation folder; cd into "Packages" folder. Search for Color Scheme - Default.sublime-package and copy-paste it into your Packages folder (under windows is %APPDATA%\Sublime Text 3\Packages).
  2. Decompress the file (with any unzip tool).
  3. Access the new generated folder and modify your theme's file (same steps as in Sublime Text 2).
  4. After applying your changes save the file and you'll see your changes.
  5. If you want, you can compress again the file as zip using .sublime-package extension but if you do so you must move that file to Installed Packages folder.

Update 2

There's a very usefull package for editing plugins named PackageResourceViewer. It allows you to edit packages very easily, doing all the decompress & move stuff for you.