Home Download Buy Blog Forum Support

Bracket matching suggestions

Bracket matching suggestions

Postby myel on Thu Mar 27, 2008 11:31 pm

jps wrote:Bracket matching is in the new beta too, and a few settings to control it. You can also press Ctrl+Shift+M to select between the brackets, and Ctrl+M to move between the brackets. By design, it only recognises parenthesis, and not square brackets nor braces. They were included in the early builds, but I found it too distracting, and more of a hindrance than a help.


Would it be possible to put those back with a preference-setting?

matchCurlyBrackets true
matchSquareBrackets true


It would also be nice to selecet how brackets will be highlighted

matchBracketsHighlight bold/underline/color


I'd like to hear what others think :)
myel
 
Posts: 88
Joined: Sat Mar 22, 2008 11:26 pm

Re: Bracket matching suggestions

Postby jps on Fri Mar 28, 2008 12:00 am

myel wrote:Would it be possible to put those back with a preference-setting?


I'll add it to the list.

myel wrote:It would also be nice to selecet how brackets will be highlighted


I'm more than happy to hear other options for indicating the brackets, I'm not entirely happy with the underlining, but imo it's the best of a less than ideal lot.

Simply drawing the brackets in a different colour could well be preferable, but I'm not sure of any clear way to derive a reasonable highlight colour that won't blend into either the foreground or background (both are arbitrary, and different brackets within the one buffer may have different colour combinations).
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Bracket matching suggestions

Postby jps on Fri Mar 28, 2008 12:13 am

It would, but I'm not a fan of highlighting via changing the background colour, it's ugly as sin :)
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Bracket matching suggestions

Postby SteveCooperOrg on Fri Mar 28, 2008 12:42 am

How about using bold to indicate the matching paren? I personally like the underline, though.

I'm also a fan of seeing curlies match, but then I'm a c# developer... squares also.
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: Bracket matching suggestions

Postby jps on Fri Mar 28, 2008 1:03 am

Cool, I'm glad you guys like it :)

With respect to highlighting other brackets, there are two options:
* Highlight the inner most pair of brackets of any enabled type
* Highlight the closest pair of each type, so there would often be multiple highlights going on

Thoughts?

Also, the current underline colour is a 50% blend of the caret colour and the background colour: I'll make the ratio configurable, as it makes a big difference to visibility.

String highlighting is an interesting one, as the strings are already highlighted via syntax highlighting, so I don't imagine you'd get terribly much by adding the underlines. Are there some cases I'm missing here?
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Bracket matching suggestions

Postby jps on Fri Mar 28, 2008 1:24 am

Ok, I'm with you now.

Strings are tricky buggers, because there's no way to tell on open quote from a close quote, except by assuming they're not allowed to span lines and counting from the beginning. No reason not to support that though, I'll add em to the list.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Bracket matching suggestions

Postby iarkin on Tue Apr 08, 2008 7:07 am

myel wrote:
jps wrote:Bracket matching is in the new beta too, and a few settings to control it. You can also press Ctrl+Shift+M to select between the brackets, and Ctrl+M to move between the brackets. By design, it only recognises parenthesis, and not square brackets nor braces. They were included in the early builds, but I found it too distracting, and more of a hindrance than a help.

Would it be possible to put those back with a preference-setting?
matchCurlyBrackets true
matchSquareBrackets true

I think an addition like this would put sublime one step closer to perfection. As I am currently programming in Haskell i sorely need bracket matching.

Thanks for a great app.
iarkin
 
Posts: 2
Joined: Tue Apr 08, 2008 6:57 am
Location: Sweden

Re: Bracket matching suggestions

Postby jps on Tue Apr 08, 2008 5:51 pm

iarkin: Welcome to the forums!

myel / iarkin - there are now options in 20080408 to configure highlighting of square brackets and braces. Take a look at Preferences/File Type Defaults/Default File Type.sublime-options.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Bracket matching suggestions

Postby myel on Tue Apr 08, 2008 10:02 pm

Thanks,

it's impressive how fast suggestions are implemented, i'm really looking forward to 1.05 :).

Any chance that bolded highlighting could be an option too...

ah i feel bad for asking for so much features...
myel
 
Posts: 88
Joined: Sat Mar 22, 2008 11:26 pm

Re: Bracket matching suggestions

Postby iarkin on Wed Apr 09, 2008 6:35 am

jps wrote:iarkin: Welcome to the forums!

myel / iarkin - there are now options in 20080408 to configure highlighting of square brackets and braces. Take a look at Preferences/File Type Defaults/Default File Type.sublime-options.

Thank you!

You and the community have done an impressive job so far. This is one app i'll buy after the trial period is over.

Programming is fun again (even haskell ;))
iarkin
 
Posts: 2
Joined: Tue Apr 08, 2008 6:57 am
Location: Sweden

Next

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 14 guests