Sublime Forum

Brackets like TextMate

#1

Tried SublimeBrackets and BracketsHighlighter, nothing like TextMate. I just really love this IDE, but there are couple of things missing and this is one of them… Is there any chance to see a beautiful and comfortable bracket highlighting in the near future?

0 Likes

#2

Not everyone has used TextMate. Can you be more specific? I think BracketHiglighter is quite attractive and comfortable and configurable. Granted I am biased because it is my plugin, but what are you looking for that you aren’t getting with these plugins?

0 Likes

#3

Actually BracketHighlighter didn’t work for me. It took something like 3 seconds until I both brackets were signed, and also I would like that the brackets will be signed only when I’m next or before them, and with softer color not white.

Thank you for your quick response by the way!

0 Likes

#4

By the way, I meant Coda not TextMate - My bad!

0 Likes

#5

BracketHighlighter usually requires a restart of Sublime Text after install. It also allows for configuring the color, the style (underline, outline, solid), I have also even added a feature to only show the match when the cursor is next to a bracket.

I would give BracketHighlighter another try. If you are having issues or have questions as to why it does or does not do something, let me know. BracketHighlighter does not control ST2’s default white underline matching, so you would have to disable that via ST2 settings.

0 Likes

#6

How can I do that? Haven’t found a setting named color or cursor…

0 Likes

#7

Yeah sorry, the names might not be as intuitive as coud be. ST2 doesn’t allow you to directly set colors to highlights, so what is done is regions are created using a certain scope; the color that scope as defined in the theme file is what gets used.

So, in BracketHighlighter.sublime-settings you can edit these lines for color; my personal settings are below (the colors will vary based on the theme you are using:

//Scope? (Defined in theme files.) -> //Examples: (keyword/string/number) "quote_scope" : "string", "curly_scope" : "support.function", "round_scope" : "keyword", "square_scope": "entity.name.class", "angle_scope" : "constant.numeric", "tag_scope" : "variable.parameter",

If you want more control, you can add your own scope to your theme file, and then set the bracket scope to your defined scope. I have an example posted in the main BracketHighlighter thread viewtopic.php?f=5&t=3327&start=10#p16694

If you want to only highlight when your cursor is next to a bracket, you can set the following setting to true:

//match brackets only when the cursor is adjacent to one "match_adjacent_only" : true,

0 Likes

#8

Awesome thanks!!

Now one last thing, it doesn’t highlight tags… Is it normal?

0 Likes

#9

Actually it does, but not in PHP files…

0 Likes

#10

It does for me.

BracketHighlighter allows you to whitelist or blacklist highlighting based on the current tmlanguage that is loaded for syntax interpretation. By default, I believe I have it set up as such.

"angle_language_list" : "HTML","HTML 5","XML","PHP"], "tag_language_list" : "HTML","HTML 5","XML","PHP"],

and:

//filter type (whitelist|blacklist) "angle_language_filter" : "whitelist", "tag_language_filter" : "whitelist",

So you see, I have it set up as a whitelist to only match if the current syntax is defined as HTML, HTML 5, XML and PHP.

In the bottom right hand corner of your editor, what syntax shows up when you have a PHP file opened?

0 Likes

#11

It shows HTML.

0 Likes

#12

Never mind, it works.
Definitely good plugin and support. Keep up the good work!

Thank you very much.

0 Likes