Home Download Buy Blog Forum Support

BracketHighlighter2 BETA Branch

Re: BracketHighlighter2 BETA Branch

Postby AGS on Mon Nov 12, 2012 3:55 am

Loving this!! Thanks for all of your hard work Isaac!
AGS
 
Posts: 32
Joined: Mon Aug 20, 2012 5:58 pm

Re: BracketHighlighter2 BETA Branch

Postby facelessuser on Mon Nov 12, 2012 4:04 pm

AGS wrote:Loving this!! Thanks for all of your hard work Isaac!

Thanks :).
facelessuser
 
Posts: 1542
Joined: Tue Apr 05, 2011 7:38 pm

Re: BracketHighlighter2 BETA Branch

Postby macdonag on Tue Nov 13, 2012 9:59 pm

Having recently started writing Clojure in Sublime, I'd like to thank you for this plugin :-)
macdonag
 
Posts: 2
Joined: Thu Aug 16, 2012 7:26 pm

Re: BracketHighlighter2 BETA Branch

Postby facelessuser on Tue Nov 13, 2012 10:12 pm

Clojure, eh? I can see why this would be helpful :). Glad I could help make your task a little easier.
facelessuser
 
Posts: 1542
Joined: Tue Apr 05, 2011 7:38 pm

Re: BracketHighlighter2 BETA Branch

Postby facelessuser on Sun Nov 25, 2012 3:42 am

Added Bracket Swapping plugin support. Also changed some things in the wrapping plugin and bracket plugin loading.

First:
If you have custom wrapping settings you need to be aware of wrapping definition changes. I made the insert_style setting an array of strings opposed to string. This allows me to consolidate redundant settings info. So now if you define only one insert style, it will automatically be applied. If the definition as more than one, it will prompt you to pick one of the styles. This way, only one bracket entry appears in the menu, and then when you select it, you will be prompted for how you wish to apply the wrapping only if there are multiple options.

Old way:
Code: Select all
{"name": "HTML/XML Tag", "brackets": ["<${BH_SEL:NAME}>", "</${BH_SEL:NAME}>"]},
{"name": "HTML/XML Tag - Block", "brackets": ["<${BH_SEL:NAME}>", "</${BH_SEL:NAME}>"], "insert_style": "block"},
{"name": "HTML/XML Tag - Block Indent", "brackets": ["<${BH_SEL:NAME}>", "</${BH_SEL:NAME}>"], "insert_style": "indent_block"}


New way:
Code: Select all
{"name": "HTML/XML Tag", "brackets": ["<${BH_SEL:NAME}>", "</${BH_SEL:NAME}>"], "insert_style": ["inline", "block", "indent_block"]}


So if you have custom wrapping settings, change all of your insert_style settings to an array, even if you are defining only one entry.

Second:
When you update your branch, you should probably restart ST2 because I changed the modules that import the bracket plugins. It may act strange or even stop working until you restart.

Third:
Swapping should be pretty straight forward. It leverages the bracket remove and bracket wrapping plugin to apply bracket swapping. You can check out the swapping definitions in bh_swapping.sublime-settings. Swapping definitions are defined exactly like wrapping definitions, but insert_style will be ignored. Swapping does an inline bracket remove followed by an inline wrapping.

That is it. Now it is time to start doing all the documentation. All planned features are in. As always, you can report bugs etc. here or on Github.

Once I get all the documentation done, and I am certain there are no major bugs, I will be prepping for the official release.
facelessuser
 
Posts: 1542
Joined: Tue Apr 05, 2011 7:38 pm

Re: BracketHighlighter2 BETA Branch

Postby peter222 on Sun Nov 25, 2012 6:00 pm

I'm looking for any plugin to match if / endif foreach / endforeach. Just installed BracketHighlighter from control panel but it doesn't work.
I see many posts in this thread with promising settings like this:

Code: Select all
{
            "name": "php_keywords",
            "open": "^\\s*\\b(if|foreach|while)\\b(?=.*:$)",
            "close": "^\\s*\\b(endif\\b|endforeach\\b|endwhile(?=;$))",
            "icon": "dot",
            "color": "brackethighlighter.tag",
            "style": "underline",
            "language_filter": "whitelist",
            "scope_exclude": ["string", "comment"],
            "language_list": ["HTML", "HTML 5", "XML", "PHP", "HTML+CFML", "ColdFusion", "ColdFusionCFC"],
            "plugin_library": "User.phpkeywords",
            "enabled": true
        },


...but please tell me, where I should put this settings??? I can find no info about it. Settings file BracketHighlighter.sublime-settings have another formatting style.
Cant find it here too :( https://github.com/facelessuser/BracketHighlighter
No info in readme file
Linux Mint 13
peter222
 
Posts: 21
Joined: Tue Jan 03, 2012 11:14 pm

Re: BracketHighlighter2 BETA Branch

Postby facelessuser on Sun Nov 25, 2012 7:50 pm

The default install of BracketHighlighter doesn't do the custom stuff, that branch is still in beta. Did you install the Beta BH2 branch? Or whatever Package Control installed for you (the master/default branch)?
facelessuser
 
Posts: 1542
Joined: Tue Apr 05, 2011 7:38 pm

Re: BracketHighlighter2 BETA Branch

Postby peter222 on Sun Nov 25, 2012 8:32 pm

Where can I find beta?
Linux Mint 13
peter222
 
Posts: 21
Joined: Tue Jan 03, 2012 11:14 pm

Re: BracketHighlighter2 BETA Branch

Postby facelessuser on Sun Nov 25, 2012 9:49 pm

You the can see this thread here for upgrading in Package Control viewtopic.php?f=5&t=9756&start=60#p38968. The actual beta branch is located here https://github.com/facelessuser/Bracket ... r/tree/BH2. Package Control was having some weird upgrade issues for a bit when you define your own branch, but hopefully it is fixed now.
facelessuser
 
Posts: 1542
Joined: Tue Apr 05, 2011 7:38 pm

Re: BracketHighlighter2 BETA Branch

Postby peter222 on Mon Nov 26, 2012 10:47 am

Just installed BH2 from Github... but still dont know where can I configure IF/ENDIF FOR/ENDFOR matching?
Linux Mint 13
peter222
 
Posts: 21
Joined: Tue Jan 03, 2012 11:14 pm

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: Google [Bot] and 6 guests