Sublime Forum

Dev Build 2114

#1

Dev Build 2114 is out now. Bracket highlighting has been tweaked, and tag highlighting is in there now, too. There are a few options for customizing the appearance in the .tmTheme files, have a look at Monokai.tmTheme for some examples.

Word wrapping has also been changed a little: when source code is being word wrapped (i.e., anything matching the selector ‘source - comment’), it’ll be indented on the following line by an extra tab stop. This can make dealing with word wrapped source code a bit more pleasant.

0 Likes

Dev Build 2116
Dev Build 2116
Highlight Background Color of Matching Bracket
#2

Shoot, will fix for 2115

You’ll have to edit the .tmTheme and remove ‘foreground’ from the bracketsOptions value.

0 Likes

#3

Thanks for the update!
I guess there will be one or two happy guys there! :mrgreen:

0 Likes

#4

It’s funny how all it takes for Jon to implement the features people clamour for (indent guides, close HTML tag, bracket/tag matching) is for someone to make a plugin to do it and then he’s right on the case!

Sorry, not trolling, just noticed it. Unfortunately I’m too used to pyparadigm’s brakcets and tag matching that the core implementation now seems a bit lame (as great as it would have been to have this functionality a few weeks ago). D’oh!

I think I’ll still turn the plugins off and go with the core stuff as I presume it won’t bog down a long file like the plugin does, plus I’m getting a bit aggravated by the view regions (rather than a simpler font colour). But the thing the plugin does over the core implementation which I hope Jon will cover is the display of the current bracket scope when you’re even within the brackets (i.e., not JUST next to).

0 Likes

#5

Hi jps. Could you make an option to change background of brackets too?

Like this:

https://github.com/pyparadigm/SublimeBrackets/raw/master/ssexample.png

0 Likes

#6

I guess I should provide some more details :slight_smile:

There are 6 new keys in the theme:

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.

0 Likes

#7

Please add outline option too! And a background color!

Pretty please with a cherry on top? :mrgreen:

0 Likes

#8

Thanks for the info here, but this doesn’t appear to work for me. I have my theme options as:

<key>bracketsForeground</key>
<string>#f92572</string>
<key>bracketsOptions</key>
<string>foreground underline</string>

<key>bracketsContentForeground</key>
<string>#f92572</string>
<key>bracketsContentsOptions</key>
<string>foreground underline</string>

But I get this:



Is there something I’m doing wrong?

0 Likes

#9

Check you’re using “bracketContents” and not “bracketsContent” - there’s a typo along these lines in the changes to Monokai.tmTheme

0 Likes

#10

It would be nice if there was an equivalent to the “bracketContents” for tags as well (so the enclosing tags are highlighted when the cursor is in the content of the tag)…

It looks nice though and there is no effect on the performance (unlike the plugin which I had to remove almost immediately because of how much it slowed things down).

Thanks.

0 Likes

#11

Thank you for the update, gutter images are working again :smile: One thing I noticed is Vintage mode seems to be broken… things like c + w to clear a word no longer works… also the selecting using shift + v and then pressing up arrow is still un selecting the line you started on :smile:

I’ll keep you posted if I notice anything else.

EDIT: *** Works after a full restart, it was only broken after the installer update. (shift + v and then pressing up arrow is still not working though) ***

0 Likes

#12

Vintage dd and d+(num) also appears to be broken.

EDIT: *** Works after a full restart, it was only broken after the installer update. ***

0 Likes

#13

Thanks Jon, this is what worked for me:

<key>bracketsForeground</key>
<string>#D3B625</string>
<key>bracketsOptions</key>
<string>foreground underline</string>

<key>bracketContentsForeground</key>
<string>#D3B625</string>
<key>bracketContentsOptions</key>
<string>underline</string>
0 Likes

#14

Ahh, now all we need is font styling, and I can have bold brackets and function names :smiley:

0 Likes

#15

[quote=“jps”]

Check you’re using “bracketContents” and not “bracketsContent” - there’s a typo along these lines in the changes to Monokai.tmTheme[/quote]

Ahh, I just copied what was in the Monokai theme (bracketContent not bracketsContents). Having said that I’ve changed it, saved, even restarted ST2 and still pink on adjacent, grey inside function. Not the end of the world but just thought I’d point it out.

[Edited for typo in technical term]

0 Likes

#16

the new bracket options are splendid, just missing an background color option.

sublime text just gets better with every (daily :wink:) release.

0 Likes

#17

Another +1 for a background color option for bracket matching.

Also, any chance of adding gutter images to the lines with the brackets as in pyparadigm’s plugin?

0 Likes

#18

The new Fold shortcuts in 2115 have overwritten the default OS X move left/right by tabs shortcuts. Was that intentional? Was the old shortcut interfering with something else I didn’t notice?

Also, it’d be really sweet if Sublime Text supported nested folding: if I fold some code and then fold the fold, it would be sweet if I could unfold once and still have the inner fold folded (the folding plugin I wrote supported this and it came in useful every once in a while).

0 Likes

#19

Any chance of having background color option for matching brackets added to the Sublime?

0 Likes

#20

It’s not documented anywhere (:confused:), but you can make brackets glow:

// xxx.sublime-color-scheme

{
    "globals":
    {
        "brackets_options": "foreground bold glow",
        "brackets_foreground": "#FFFFFF",
        "bracket_contents_options": "foreground bold glow",
        "bracket_contents_foreground": "#FFFFFF",
    }
}

I too would love background color options for bracket matching, it’s clean and high-contrast. Failing that the ability to adjust glow size, glow shape, and glow color would help.

0 Likes