Home Download Buy Blog Forum Support

SublimeBrackets

Re: SublimeBrackets

Postby skaet on Thu Sep 08, 2011 10:57 pm

janitux wrote:I upgraded from dev 2112 to 2113 and started experiencing that problem too, for bracket's sake i'm back at 2112 :)

This is a bug in 2113 that is now fixed in 2114.
skaet
 
Posts: 93
Joined: Thu Sep 16, 2010 3:37 pm

Re: SublimeBrackets

Postby janitux on Fri Sep 09, 2011 3:08 pm

skaet wrote:
janitux wrote:I upgraded from dev 2112 to 2113 and started experiencing that problem too, for bracket's sake i'm back at 2112 :)

This is a bug in 2113 that is now fixed in 2114.


awesome, thanks :)

I love the plugin btw
janitux
 
Posts: 2
Joined: Thu Sep 08, 2011 6:20 pm

Re: SublimeBrackets

Postby facelessuser on Wed Sep 21, 2011 9:08 pm

This is a great plugin. I have forked the plugin to fix some things and add some features that I found useful. I wouldn't mind having these changes merged back into Sublime Brackets, but they may be more than the author wants to merge.

  • I combined SublimeTagmatcher and SublimeBrackets. I saw no reason these two could not function together and accomplish the same task in one pass without adding too much overhead.
  • I moved all configurations to the settings file
  • Made settings accessible from the menu
  • Allow selectively turning off or on specific bracket matching
  • Allow to exclude certain bracket matching in certain languages
  • As stated early, it matches Tags, but also can match, quotes, and Angle brackets (depending on the language angle can be a little off;this is do to how the language is defined to Sublime Text)
  • Added new configuration to only highlight the brackets of tag on highlight
  • Added option to ignore not Tag Angle brackets if desired
  • On really large files you can sometimes get some lag, so I added a search threshold to stop searching if you can't find a match after reaching out so far
  • Added a "on demand" shortcut to override threshold to search until a match is found
  • When the "on demand" shortcut is used, it will display the number of lines in the highlighted block within the status bar
  • Tweaked the algorithm to be a little more efficient (probably more can still be done); some characters where getting double searched

Anyways, the repository is here, and again, thanks to pyparadigm for this great plugin.
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeBrackets

Postby oriceon on Mon Sep 26, 2011 7:50 am

Hey facelessuser, thanks for this greate plugin improvments! I test it and works verry good!

And, to not forget pyparadigm for his initial work!
oriceon
 
Posts: 56
Joined: Tue Jun 14, 2011 6:06 am

Re: SublimeBrackets

Postby facelessuser on Mon Sep 26, 2011 2:08 pm

Thanks!

I added the last planned features since the last post.

  • New colored underline highlight style
  • Option to only highlight when cursor is adjacent to a bracket
  • Shortcut to select content between brackets
  • Shortcuts to either move the cursor to the first or last bracket (Will also scroll to the bracket if it is off screen, but only when not currently multi-selecting)

I don't plan on adding any other features, just support for more recent HTML 5 tags. I am open to suggestions though.
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeBrackets

Postby eclaird on Tue Sep 27, 2011 12:33 pm

I've been using a customized version of pyparadigm's code. I added support for user settings and cleaned up the code since pyflakes/pep8 did not agree with the code style :)

SublimeBracketHighlight.py

Configuration keys:
Code: Select all
{
   # Boolean. Draw only outline instead of filling the background
   "curly_brace_only_outline": false,

   # Scope name for braces (themes)
   "curly_brace_scope": "entity.name.class",

   # Gutter icon style. Possible values: dot,circle,bookmark,cross
   "curly_brace_icon": "dot",

   "round_brace_only_outline": false,
   "round_brace_scope": "entity.name.class",
   "round_brace_icon": "dot",

   "square_brace_only_outline": false,
   "square_brace_scope": "entity.name.class",
   "square_brace_icon": "dot"
}
eclaird
 
Posts: 2
Joined: Tue Sep 27, 2011 8:15 am

Re: SublimeBrackets

Postby facelessuser on Tue Sep 27, 2011 5:15 pm

Even though the threshold option I added on my fork reduced lag issues, I still wasn't satisfied; large files would still cause some lag when scrolling with arrow keys, and on slow computers, when typing.

I have now debounced the modify and selection event which dramatically reduces lag, so much so that I have been able to significantly increase my search threshold without adverse effect. I am surprised I didn't think to debounce the events sooner. So now, instead of matching tags every time you move your cursor or type a letter, it will wait if a rapid succession of events is firing and only match when things let up. Modify events take precedence over selection events so that you won't have the bracket move on you while the highlight doesn't when you are typing, deleting, or undoing.
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeBrackets

Postby xavi on Fri Sep 30, 2011 5:55 am

facelessuser wrote:Even though the threshold option I added on my fork reduced lag issues, I still wasn't satisfied; large files would still cause some lag when scrolling with arrow keys, and on slow computers, when typing.

I have now debounced the modify and selection event which dramatically reduces lag, so much so that I have been able to significantly increase my search threshold without adverse effect. I am surprised I didn't think to debounce the events sooner. So now, instead of matching tags every time you move your cursor or type a letter, it will wait if a rapid succession of events is firing and only match when things let up. Modify events take precedence over selection events so that you won't have the bracket move on you while the highlight doesn't when you are typing, deleting, or undoing.

Unfortunately the original plugin could only be used with very small files. This fork is really a great improvement in performance. Good job.

Thank you very much!!!
xavi
 
Posts: 24
Joined: Sat Jul 30, 2011 12:00 am

Re: SublimeBrackets

Postby facelessuser on Fri Sep 30, 2011 2:40 pm

Thanks.

I know what you mean. I was using this plugin at work, and we have some large firmware files that can be quite sloppy with formatting on occasion, so I really wanted to be able to match the brackets, but it slowed down when outside of small functions. I was left with either abandoning using the plugin due to performance or come up with a solution.

I tried to expose as many knobs as I could to allow the tailoring of performance to specific machines, so hopefully now it can be quite practical in all situations.
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Previous

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 9 guests