Home Download Buy Blog Forum Support

BracketHighlighter 2 Moar Bracket Powa!

Re: BracketHighlighter 2 Moar Bracket Powa!

Postby facelessuser on Sun Oct 07, 2012 5:27 pm

Rezzie wrote:Where do I need to save this to enable Ruby matching?


It only exists on my computer right now :D. I am trying to find people willing to test when I have a more solid test branch. If you are interested, I will let you know when I have a branch up.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: BracketHighlighter 2 Moar Bracket Powa!

Postby facelessuser on Wed Oct 10, 2012 8:13 pm

BH2 is coming along nice. It can now match the basics like {}, [], (), <>, and tags. You can also define custom pairs. It can find like brackets such as "" or '' if they are part of the same scope. You can also define custom pairs of these as well.

All matches are currently performed when the cursor is between the brackets. The old version would allow you to touch the outside of a bracket with the cursor; this functionality does not currently exist, and probably won't on initial release (if at all; it would really depend if enough people called for it down the road).

In general, the search time for brackets matching is more flat with a given threshold in the new version. The old way, the bracket match was quick when the brackets were close, and much slower when they were further away. Increase the threshold, and really far brackets were really slow. The new search method is quicker for further away brackets, but it is more flat. Close brackets and far brackets search time is not so so drastic anymore. If you increase the threshold on the new version the whole range slows a little, but comparing a threshold of 4000 between old and new, the new is much faster on average than the old.

I know this might not make since, but in short, on average, BH2 matches brackets faster and it is more configurable for almost any "bracket" pair you want. Basically you will be able to increase your threshold and search further and it still feel like it did on lower thresholds in BH1.

I have also added functionality that will wrap a given selection with any bracket pair you want. You can even configure it to indent etc. So if I had some C code and I wanted to but an #if/#endif switch around it, BH2 would block it off and surround it with the brackets. If I had some Ruby code and wanted to put a if/end conditional around a selection, BH would wrap the selection and indent the content (if defined to do such). You would then have to define the actual condition, but the if/end would be wrapped around it. Its pretty basic, but useful.

I have most of the supplemental plugins ported over for use in BH2 (assuming I don't change how plugins are defined again). So things like jumping between the two bracket ends, folding by brackets, swapping quotes, swapping brackets, etc. is working (some of the tag stuff not yet).

I still have some stuff to work out though. Currently I don't have searching of brackets inside strings enabled yet, I have to figure out if I want to just allow basic bracket searching via an external plugin, or allow some kind of recursive bracket matching inside scope bracket matching. And other stuff. I am sure even after the beta, it will need some refining, but good progress has been made.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: BracketHighlighter 2 Moar Bracket Powa!

Postby facelessuser on Sat Oct 13, 2012 4:04 pm

Looks like I should have an alpha out within the week.

-It now can match almost any unlike brackets you define (think {}, [], #if/#endif, etc.)
-It can find most any like brackets you define if they are contained in the common scope. (think quotes, etc.)
-If you have a matched scope type bracket pair, you can also find sub brackets (think finding (), {}, etc. inside quoted strings)
-You can wrap selections with brackets of your choice, even slightly less brackety things like #if/#else/#endif and it will properly indent all elements added.
-You can remove simple brackets so anything thing with only a start cap and or an end cap, (think {}, [], #if/#endif...but not #if/#else/#endif)
-When wrapping brackets you have the content blocked off, or blocked and the content indented
-You can swap brackets. It replace them inline no formatting. But it can do things like turn a #if/#endif into a #if/#else/#endif and indent the extra item.
-You can swap quotes and it will take care of proper escaping of quotes inside the string.
-It can jump between bracket end caps.
-It can select content between brackets.
-Fold the bracket content.
-Find tags.
-Select tag names in both the opening and closing tags for quick and easy changing.
-Jump between opening and closing tags, and jump between tag attributes.

So a lot of stuff it could already do, but some new stuff as well. The big thing being a increased performance (based on the testing I have done so far), and increased configurability so people can finally configure any bracket they want. Also the new wrap brackets around selection feature.

The last thing I need to really figure out is how to properly take care of specific cases such as strings where you don't want to find escaped brackets in a regex string, just the unescaped brackets. Because everything is so generalized now (so people can define the matching for anything), I am trying to think of a generalized way to define this so I am not hard coding it and interfering with scenarios where this is not desired.

But anyways, things are looking pretty good. Hopefully testing can begin in this next week.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: BracketHighlighter 2 Moar Bracket Powa!

Postby Eduan on Sun Oct 14, 2012 4:18 pm

Just wanted to say, I am looking forward to this plugin, and using it. :)
Check out my blog and website: EduanTech.com (currently undergoing some facial and organs makeover...)
Also check out my profiles: GitHub - Greduan | BitBucket - Greduan
Eduan
 
Posts: 140
Joined: Sun Oct 14, 2012 4:05 pm

Re: BracketHighlighter 2 Moar Bracket Powa!

Postby facelessuser on Sun Oct 14, 2012 7:36 pm

Eduan wrote:Just wanted to say, I am looking forward to this plugin, and using it. :)


Thanks! I have been avoiding the re-write, but I know a lot of people have wanted more flexibility. Hopefully this will live up to people's expectations; it has been a lo of work :).
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: BracketHighlighter 2 Moar Bracket Powa!

Postby Eduan on Sun Oct 14, 2012 8:31 pm

facelessuser wrote:
Eduan wrote:Just wanted to say, I am looking forward to this plugin, and using it. :)


Thanks! I have been avoiding the re-write, but I know a lot of people have wanted more flexibility. Hopefully this will live up to people's expectations; it has been a lo of work :).

I hope so too. :) I'm sure I'll use it though.

Just a question, I still can't understand exactly what this plugin is for... I understand it's to customize the way brackets etc. light up, depending on your settings, is this right?
Eduan
 
Posts: 140
Joined: Sun Oct 14, 2012 4:05 pm

Re: BracketHighlighter 2 Moar Bracket Powa!

Postby facelessuser on Sun Oct 14, 2012 8:55 pm

This is a re-write of BracketHighlighter. Originally BracketHighlighter was written by Pyparadigm (it was called something else though). Anyways, I increased performance on it and added a number of features which never got pulled in, and eventually Pyparadigm removed his original package.

BracketHighlighter used the core algorithm that Pyparadigm put in place, but it was limited to {}, [], (), and tags (which triggered off of <>). It was very specific and not very flexible. I was able to squeeze in quotes, but it was all hard coded. I kept getting requests for other types of brackets or bracket like matching, but the algorithm could not support it easily at all.

So, I was left with telling people I could not support their request, or re-write the algorithm to support it. A complete re-write is a lot of work, so I have put it off for quite a while. This is what BracketHighlighter2 is. BracketHighlighter 2 is a complete re-write that allows users to configure automatic matching of whatever they need. Quotes, brackets, #if compiler switches, ruby if/end blocks, CSSEdit @group stuff, tags, and whatever other bracket like matching that is desired with minimal effort from me or the user. Now you can just define the rules in the settings file, and BracketHighlighter 2 will take it from there (really tricky stuff can tap into bracket plugins to accomplish the task).

An added benefit is the algorithm is seems faster overall.

In short BracketHighlighter 2, if all goes well, is meant to be the successor of BracketHighlighter; it will replace the old BracketHighlighter. Hopefully, everyone will like it much more. As long as performance for everyone is as good or better, this will be the new version. Which is why I need people to test it and real feedback. It is meant to be BracketHighlighter, but more configurable and faster.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: BracketHighlighter 2 Moar Bracket Powa!

Postby Eduan on Sun Oct 14, 2012 9:08 pm

OK, that makes it very clear. :)

Whenever you get the beta out, you can count on me, just send me a PM. ;)
Check out my blog and website: EduanTech.com (currently undergoing some facial and organs makeover...)
Also check out my profiles: GitHub - Greduan | BitBucket - Greduan
Eduan
 
Posts: 140
Joined: Sun Oct 14, 2012 4:05 pm

Re: BracketHighlighter 2 Moar Bracket Powa!

Postby facelessuser on Sun Oct 14, 2012 9:51 pm

Eduan wrote:OK, that makes it very clear. :)

Whenever you get the beta out, you can count on me, just send me a PM. ;)

Will do. I should have a beta out this next week. BH2 now does everything the old one did (except for maybe one or two minor things I have removed for now). I plan on tweaking the code for the new feature of wrapping brackets around a selection, and then I will create a testable branch.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: BracketHighlighter 2 Moar Bracket Powa!

Postby Eduan on Sun Oct 14, 2012 10:33 pm

Awesome! Looking forward to it. :)
Check out my blog and website: EduanTech.com (currently undergoing some facial and organs makeover...)
Also check out my profiles: GitHub - Greduan | BitBucket - Greduan
Eduan
 
Posts: 140
Joined: Sun Oct 14, 2012 4:05 pm

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 9 guests