Sublime Forum

BracketHighlighter2 BETA Branch

#55

This is awesome Isaac! I think this is getting to the point where it is no longer alpha. :smile:

Just wanted to ask a question though, I haven’t installed this package so don’t know exactly how it works.

But from what I’ve seen in the images, even a single curly bracket ( { ) will put a two brackets image ( {} ) in the left. Is this updated so that it only shows one, meaning the closing one or the opening one, or both if it applies.

0 Likes

#56

Picture is worth 1000 words:


0 Likes

#57

OK I see how that works, could you modify it so that it shows the opening tag, closing tag, or both depending on which one is found? Or would it be too much? Just cause I think it would really make things clearer. :smile:

  • Eduan

EDIT: I did not read the text, lol. That’s awesome, glad it works, just gotta add the correct icons then?

0 Likes

#58

In order to do that I need icons.

currently I have:
icon.png
icon_small.png

To do what you want for a particular bracket I need (brackets that do not want to show open and close could omit the open and close):
icon.png
icon_open.png
icon_close.png
icon_small.png
icon_open_small.png
icon_close_small.png

I am not a fan of making lots of tiny icons and trying to position them just right. But I will make everyone a deal. If someone provides all the icons all lined up nice and with the size variants, I will add the functionality :smiley:. Deal?

0 Likes

#59

Deal! So what do you want me to do? Just center them and make them small when the image is small?

0 Likes

#60

Kind of, but not quite.

  • Icons are 16X16 regardless if they are big or small.
  • The icons need to be white with transparent backgrounds so that when they get masked they are the correct color.
  • They need to all be relatively lined up and look appropriate aligned in the gutter. So if the curly icon is centered in the gutter, and the round looks like it is left justified, it is jarring. They all need to roughly be centered/aligned the same.
  • Small icons are the same size png as the large, but you have to shrink the actual icon in roughly in the upper left quadrant. If someone made a template that had a layers with guides to optimally place the icons that are big or small, that would help.
  • Next you need open and close and normal (both opening and closing) for the icons that make sense. And you need small variants of all three.
  • Follow the naming convention shown above.

Icons like “dot” etc, that don’t make sense having opening and closing can omit the open and close variants.

That is it. If you do that, I will add the support. Currently I show show the same icon on closing and opening, and if any bracket cannot be matched, I show the same invalid icon. Do not worry about invalid icons, I am leaving that generic. If you come up with a better invalid, that is great.

0 Likes

#61

Seems doable, tedious mostly, really.

So I have to do this for all the icons except those that don’t make sense to have them, correct? If so, should I just fork the project and when I finish do a pull request?

  • Eduan
0 Likes

#62

OK, well I forked the project, I’m gonna start working on it, expect it today or tomorrow. :smile:

0 Likes

#63

[quote=“Eduan”]Seems doable, tedious mostly, really.

So I have to do this for all the icons except those that don’t make sense to have them, correct? If so, should I just fork the project and when I finish do a pull request?

  • Eduan[/quote]

You understand the problem quite well. Very tedious. More than I cared to do.

But, you will make a lot of people happy :smile:. You are not the first to request this; my answer has always been the same, and I have yet to see icons. So it will be nice to actually get icons.

0 Likes

#64

[quote]Indeed, hahaha

  • Kurtjmac
    [/quote]

Status report, finished closing tags (quite easy. :stuck_out_tongue: )

Gonna finish opening brackets now.

BTW, I’m also including the quotes, I think I’m gonna make a single quotes icon also, gonna make opening/closing icons for single/double quotes. :smiley:

0 Likes

#65

Make sure you test the small icons by shrinking your font and then move the cursor around.

0 Likes

#66

I’ve run across a block, how do you actually enable the package so that I can test it? lol

0 Likes

#67

OK, well I wasn’t able to test it cause I wasn’t able to figure it out.

But I have updated the icons, and it’s ready, so you just gotta test it using my fork:
github.com/Greduan/BracketHighlighter

  • Eduan
0 Likes

#68

Did you restart ST2 after installing it? Also, the folder must be called BracketHighlighter under packages.

I will try giving it a go later tonight.

Make sure you commit it or I can’t test it.

0 Likes

#69

Is there a way to use package control to grab a branch other than master of BracketHighlighter?

0 Likes

#70

Go to User/Package Control.sublime-settings and add the link to the repository. key at the bottom of the file:

[pre=#151515] “SublimeWebColors”,
“Terminal”,
“Theme - Phoenix”,
“VBScript”
],
“package_name_map”:
{
“sublime-languages”: “AAALanguages”
},
“repositories”:

    "https://github.com/facelessuser/BracketHighlighter/tree/BH2",
    "https://github.com/netatoo/phoenix-theme",
    "https://github.com/bizoo/SmartCursor",
    "https://github.com/facelessuser/sublime-languages",
    "https://github.com/facelessuser/FuzzyFileNav"
][/pre]

Then issue the Package Control: Upgrade Package command and pick BracketHighlighter

0 Likes

#71

@eduan don’t forget to commit your icons to your branch. I can’t test them if they aren’t there. And thanks for your effort.

0 Likes

#72

[quote=“facelessuser”]

Go to User/Package Control.sublime-settings and add the link to the repository. key at the bottom of the file:

[pre=#151515] “SublimeWebColors”,
“Terminal”,
“Theme - Phoenix”,
“VBScript”
],
“package_name_map”:
{
“sublime-languages”: “AAALanguages”
},
“repositories”:

    "https://github.com/facelessuser/BracketHighlighter/tree/BH2",
    "https://github.com/netatoo/phoenix-theme",
    "https://github.com/bizoo/SmartCursor",
    "https://github.com/facelessuser/sublime-languages",
    "https://github.com/facelessuser/FuzzyFileNav"
][/pre]

Then issue the Package Control: Upgrade Package command and pick BracketHighlighter[/quote]

It just tells me there are no packages available for upgrade.

0 Likes

#73

Try restarting ST2, it might not have updated its list of packages to upgrade yet. On restart, it might upgrade the package for you…then you would have to restart again because it is so different than the old version.

EDIT: Post your package control settings file if you are still having trouble so I can verify everything is in there correct. Oh, and if you never had BrackeHighlighter installed in the first place, just install it like normal.

0 Likes

#74

[quote=“facelessuser”]Try restarting ST2, it might not have updated its list of packages to upgrade yet. On restart, it might upgrade the package for you…then you would have to restart again because it is so different than the old version.

EDIT: Post your package control settings file if you are still having trouble so I can verify everything is in there correct. Oh, and if you never had BrackeHighlighter installed in the first place, just install it like normal.[/quote]

I had never had it installed in the first place. Thanks for your help.

I like the default styling of this much better than the 1.X BH; it’s much less in-your-face without sacrificing usefulness.

0 Likes