Home Download Buy Blog Forum Support

ST3 BracketHighlighter Status

ST3 BracketHighlighter Status

Postby facelessuser on Thu Jan 31, 2013 7:04 pm

I have decided to only port the next release of BracketHighlighter2. I have been able to restore basic bracket highlight functionality, but the there is a lot of broken crap dealing with the Bracket Plugins. Also, it appears that parts of the API are not yet finished which also gives a less than reliable experience in regards to settings being reloaded proper.

Nothing has been committed, and I don't know yet when it will be because I am going to have to restructure a bunch of crap because of the substantial changes. Removing begin_edit and end_edit really screws up my system...argghh.

ST3 is a pretty big change really messing up how I did things. General highlighting was pretty easy to kick start on ST3...everything else...not so much.
facelessuser
 
Posts: 1541
Joined: Tue Apr 05, 2011 7:38 pm

Re: ST3 BracketHighlighter Status

Postby facelessuser on Thu Jan 31, 2013 7:11 pm

Sigh. There are apparently other things not implemented that are holding me back. I may need to wait until ST3 catches up first. Surprisingly it is not the Python3 upgrade causing me trouble, but the ST3 plugin system changes.
facelessuser
 
Posts: 1541
Joined: Tue Apr 05, 2011 7:38 pm

Re: ST3 BracketHighlighter Status

Postby sublimator on Fri Feb 01, 2013 2:15 am

Yeah, it's kind of weird how you don't really have access to begin_edit() outside of a command, yet still need to explicitly pass around edit objects.

I'm guessing top level commands (issued by keybinding/palette/menu etc vs api) are the only ones that are of consequence to the undo/repeat/macro system?

If that's the case, I'm wondering why even need to pass around edit objects, other than that's the way it was done in ST2?
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 648
Joined: Thu Mar 20, 2008 5:41 am

Re: ST3 BracketHighlighter Status

Postby sublimator on Fri Feb 01, 2013 2:19 am

re: dangling Edit objects, with view.end_edit(edit) not called

Perhaps if the api for non command based edits just took a function to execute immediately you wouldn't have as many of those problems

re: nested edits

Does any one have much insight into how they worked in ST2?
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 648
Joined: Thu Mar 20, 2008 5:41 am

Re: ST3 BracketHighlighter Status

Postby facelessuser on Fri Feb 01, 2013 2:34 am

Yeah, it has really thrown a monkey wrench in this plugin. I have a feeling I will need to rearchitect how I am doing things. Not what I was hoping. It is like you said; it is odd that you have to pass around the edit object, but you can't create one yourself anymore.
facelessuser
 
Posts: 1541
Joined: Tue Apr 05, 2011 7:38 pm

Re: ST3 BracketHighlighter Status

Postby sublimator on Fri Feb 01, 2013 3:09 am

Dunno if you used ST1, but back then there was no explicit edit objects at all

Yeah, I got a fuckbunch of plugins that'll need "fixing" too :/

Hardly any of the edits for those will even make sense to be able to macro/repeat
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 648
Joined: Thu Mar 20, 2008 5:41 am

Re: ST3 BracketHighlighter Status

Postby facelessuser on Fri Feb 01, 2013 7:26 pm

Seems like just creating a TextCommand and just calling it where you need to edit is sufficient since the run commands seem to be synchronous. Any data you wanted to share though, you usually have to stuff in some global object for sharing. A little annoying, but not a big deal. So I have parts of different bracket plugins working again. Still a bit more shuffling to be done.

Anyone had any issues with changing the selections? It appears that every time my plugin sets the selection, my cursor disappears instead.
facelessuser
 
Posts: 1541
Joined: Tue Apr 05, 2011 7:38 pm

Re: ST3 BracketHighlighter Status

Postby facelessuser on Fri Feb 01, 2013 7:56 pm

Hmm.

Individually adding them as below doesn't seem to work for me.

Code: Select all
view.sel().add(Region)


For some odd reason this does:
Code: Select all
view.sel().add_all([Region])


I may take a look into the Sublime layer and see what the deal is...weird. Well that is more functionality restored. BH2 for ST3 is well on its way.
facelessuser
 
Posts: 1541
Joined: Tue Apr 05, 2011 7:38 pm

Re: ST3 BracketHighlighter Status

Postby facelessuser on Fri Feb 01, 2013 8:01 pm

Well, it probably was because I was mapping it. Looks like add_all just calls add anyways. Maybe there is a PY3 issue here. I was actually doing this which used to work:

Code: Select all
map(lambda x: self.view.sel().add(x), self.sels)


Not so much anymore...well it add_all is working, I will look into the whys for map later.
facelessuser
 
Posts: 1541
Joined: Tue Apr 05, 2011 7:38 pm

Re: ST3 BracketHighlighter Status

Postby facelessuser on Fri Feb 01, 2013 11:38 pm

BracketHighlighter2 is ported except for wrapping and swapping. This is broken because view.insert stopped returning number of modified characters in ST3 (this is useful because sublime will convert spaces to tabs or vice versa).

I am hoping Jon will bring back the missing functionality. As soon as this is resolved, I will post a ST3 BracketHighlighter2 branch.
facelessuser
 
Posts: 1541
Joined: Tue Apr 05, 2011 7:38 pm

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 8 guests