Home Download Buy Blog Forum Support

Brackets like TextMate

Brackets like TextMate

Postby BomBin on Sat Dec 24, 2011 8:24 am

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?
BomBin
 
Posts: 18
Joined: Sat Dec 24, 2011 8:12 am

Re: Brackets like TextMate

Postby facelessuser on Sat Dec 24, 2011 8:33 am

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?
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: Brackets like TextMate

Postby BomBin on Sat Dec 24, 2011 8:46 am

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!
BomBin
 
Posts: 18
Joined: Sat Dec 24, 2011 8:12 am

Re: Brackets like TextMate

Postby BomBin on Sat Dec 24, 2011 8:48 am

By the way, I meant Coda not TextMate - My bad!
BomBin
 
Posts: 18
Joined: Sat Dec 24, 2011 8:12 am

Re: Brackets like TextMate

Postby facelessuser on Sat Dec 24, 2011 3:42 pm

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.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: Brackets like TextMate

Postby BomBin on Sat Dec 24, 2011 7:02 pm

How can I do that? Haven't found a setting named color or cursor..
BomBin
 
Posts: 18
Joined: Sat Dec 24, 2011 8:12 am

Re: Brackets like TextMate

Postby facelessuser on Sat Dec 24, 2011 9:07 pm

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:
Code: Select all
   //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:
Code: Select all
   //match brackets only when the cursor is adjacent to one
   "match_adjacent_only" : true,
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: Brackets like TextMate

Postby BomBin on Sat Dec 24, 2011 9:25 pm

Awesome thanks!!

Now one last thing, it doesn't highlight tags.. Is it normal?
BomBin
 
Posts: 18
Joined: Sat Dec 24, 2011 8:12 am

Re: Brackets like TextMate

Postby BomBin on Sat Dec 24, 2011 9:26 pm

Actually it does, but not in PHP files..
BomBin
 
Posts: 18
Joined: Sat Dec 24, 2011 8:12 am

Re: Brackets like TextMate

Postby facelessuser on Sat Dec 24, 2011 9:39 pm

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.

Code: Select all
"angle_language_list" : ["HTML","HTML 5","XML","PHP"],
   "tag_language_list"   : ["HTML","HTML 5","XML","PHP"],


and:

Code: Select all
//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?
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Next

Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 6 guests