facelessuser / brackethighlighter Goto Github PK
View Code? Open in Web Editor NEWBracket and tag highlighter for Sublime Text
Home Page: https://facelessuser.github.io/BracketHighlighter/
Bracket and tag highlighter for Sublime Text
Home Page: https://facelessuser.github.io/BracketHighlighter/
So I'm having some trouble getting my theme to highlight the colors that you have given. I'm using the scopes in the user settings for BH, and I added the entire theming copy and paste to my theme. Using a scope that already exists in the theme works, but the new scopes don't. I probably just screwed something up. Would it be possible for you to take a look at my theme file/plugin settings to see what I screwed up?
Sadly I forgot to test HTML tag matching before last commit. Fix coming shortly
Just an update, I already forked your repo and started working on the Retina display icons. Just some questions:
Eduan
I'm not sure if I messed something up, but I've tried a clean re-install and that didn't seem to fix anything. Is there some setting to turn on the gutter icons that I'm missing? Thanks!
I know it is childish but..
can you add color settings in the BracketHighlighter.sublime-settings so that we can tune it up according our taste?
I like it all a lot, but it the highlighter beats the eyes too much.. it distracts me more then help.
thanks a lot
This package seems to work wonderfully well โ thank you! :)
The only problem that I have with it so far is that it is very distracting. It is near impossible to see the cursor if it's next to one of the brackets being highlighted. This is a problem I never had with TextMate's bracket highlighting.
Is it possible to make it more subtle, and if so, how do you configure it that way? I cannot imagine I'm alone at this.
Notepad++ highlights matching tags within PHP code which is superhandy. I've come to miss it after switching to ST2.
For example:
echo '<div class="a-class">';
foreach($array as $key => $val)
{
echo $val;
}
echo '</div>';
Placing the cursor on </div>
would highlight the matching <div>
, even though it's contained in PHP code. Magic!
It would be very helpful to differentiate the case when a certain tag is opened and closed in the same line. Why? Because it has the same visual effect as if its opening/closing is outside the screen. Something like <.>, {.}, etc.
P.S.: Love this extension, a real must have in Sublime Text 2.
using sublime 2
i want to remove the border of the highlighted braces & others.
When they are like {}| & there is no text between them and the text input caret's position is at its end, caret is not clearly visible. the space between the braces seems like a caret.
currently available outlines:
// Outline? (solid|outline|underline|none)
solid is actually solidColor+outline
which should infact apply ONLY solidColor to the highlight and NO outline.
As outline is ONLY outline, underline is ONLY underline.
In the same way solid should be ONLY solid.
There should be 1 more outline 'solid+outline' to apply both solid color & outline.
As for my case i only want solid color only to the highlights so selected solid, but its applying outline too which makes surrounding text & caret unclear to read.
I can't for the life of me figure out how to change the highlight from background to underline.... I followed the readme and tried to paste this snippet into the "bracket highlighter > Settings - User" file and I get the following error
Error trying to parse settings: Unexpected trailing characters in ~/Library/Application Support/Sublime Text 2/Packages/User/BracketHighlighter.sublime-settings:2:19
Then after I deleted it out, I get this error on startup
Error trying to parse settings: No data in ~/Library/Application Support/Sublime Text 2/Packages/User/BracketHighlighter.sublime-settings:1:1
So I then tried to paste those into my sublime user file and that doesn't work either. What am I doing wrong??
// Outline? (solid|outline|underline|none)
"quote_style" : "underline",
"curly_style" : "underline",
"round_style" : "underline",
"square_style": "underline",
"angle_style" : "underline",
"tag_style" : "outline",
hi facelessuser,
in the readme you say somewhere that :
"By default, the scope is "entity.name.class", but you could change it to "keyword" or any other scope in your theme." ...
"If you want more control of the colors, you can define your own scopes."
what do you mean by scopes. where do i paste the xml code ? i tried pasting it in Coda.tmTheme (i use the coda colour theme) but no change in the highight colors at all. where did i go wrong ?
As discussed in http://www.sublimetext.com/forum/viewtopic.php?f=5&t=9505. Also see http://www.sublimetext.com/forum/download/file.php?id=1120.
Due to the limitations of the Sublime API, at the moment the implementation will erase other highlightings applied to the affected text. That's not a problem if this would be easily togglable.
In large/medium code blocks and methods the initial and ending brackets aren't highlighted.
Also happens when brackets are just 1 line apart but with a lot of code in that line (like a byte64 image).
Love the extension BTW =D
Like many coders, I pick a font that helps me quickly identify/distinguish aspects of the code quickly. I also become used to what brackets in that particular font look like.
It would be very nice if, instead of icons in the gutters we could use the actual font we've chosen.
Other benefits of fonts over icons:
I'm not sure if non-image entities can be used in the gutter, but perhaps a light-weight font-to-image converter could be used if only images are allowed.
Would be fantastic
It would be very convinient to look at a bold highlighted brackets
Add Block Highlight feature, much like VS 2012. Rather than the two bracket icons in the gutter (at open & close), highlight with a thin strip of customizable color. This helps a lot while checking scopes & looks good.
I am aware that downloading master as zip does not work for the repo currently. I am trying to get a hold of github to understand what is going wrong. I am not aware of anything wrong on the repo side, but I am looking into it. I suspect a github issue.
Package Control will not be able to install BracketHighlighter while this is broken.
Current method for identifying unique view was changed. Turns out it is not sufficient and can cause issues with multi-select. Needs to be reverted.
When I access any of the settings files via Preferences menu it appears empty in the editor.
When opened directly from file browser, the file appears ok.
would it be possible to change the color of the brackets themselves when highlighted instead of highlighting via background color? i find it hard to see the actual bracket text when it is highlighted currently. plus the fact that the brackets turn red is probably my favorite feature from notepad++
BracketHighlighter overrides the default keyboard shortcut for starting the "Run" build variant (ctrl+shift+b
).
I don't know which one was first, but I think it's bad practice to override a key binding that is native to Sublime. If you must do so (for backwards compatibility reasons) I suggest at least providing an alternative shortcut that replaces the default "Run" shortcut.
I think this explains everything:
http://www.screencast.com/users/Eduan/folders/Default/media/c8cc7cfa-effd-44c4-a2db-3a30d21bc113
In case it doesn't, notice how the commented closing PHP tag breaks the syntax highlighting of the entire file.
Is this a bug that can be fixed with BracketHighlighter? Or does this require editing PHP's language file?
I'm new to BracketHighlighter, but like it so far. However, how to I get highlighting to work when my View>Syntax is Rails. When I change the syntax to HTML, the tag highlighting works well. But, if I choose Ruby or one of the Rails, the tag highlight stops working. Quote and parenthesis works fine for those syntaxes.
Brackets inside a string can cause quote match to fail.
Can be fixed with a simple check that kicks out of bracket adjacent function if in the middle of a string.
Will post fix in next commit.
Is it possible to highlight ruby code blocks with this plugin?
For example do..end, unless..end etc.
It is not clear how to do it according to the readme
thanks
OSX 10.7.2
Sublime Text 2 Beta 2139
It doesn't happen all the time, but it's often when I highlight past the edge of the document, causing scrolling.
On the illustration picture, it shows several layers being highlighted simultaneously. However, when I use the plugin, only one bracket is highlighted at a time. I can't find anything in the settings either. Am I missing something? I really want multiple colors and brackets to be highlighted at the same time.
Thanks! :)
A user reported on irc that using the "replace all" function or ALT+F3 on a really big document makes sublime hangs.
This was not reported as a problem with your plugin, but I tested this and with the plugin enabled sublime hangs.
I suggest adding a sanity check of "amount of selections", for example if there more than 10 selections skip every feature that the plugin adds.
Steps to reproduce:
1 - download this file: http://dl.dropbox.com/u/9303546/SublimeText/Packages/BracketHighlighter/test.html
2 - select <html>
3 - ALT+F3 ( this will add 9975 regions )
4 - once the selection is done press arrow right ">" then hit enter to add a new line.
With the plugin enabled this take ages, with the plugin disabled this takes seconds.
I've found that if I give a method a name which contains a number, i.e., "convert_2_something", the highlighting of that method breaks. Does the open pattern need to be changed to account for numbers in the naming scheme?
Since everyone is using his own color scheme, this package should have the option for people to chose the color of the highlighted items.
Anyways it's a minor change but it would be nice thou.
thanks for you package, it's amazing. Keep up the good work.
Hi there - this isn't an issue as much as it is a request to be pointed in the right direction if possible
I'd like to be able to have BracketHighlighter nicely handle Django Templates. They use a {% %} open and close for tags, and {{ }} for variables. They of course are placed into HTML markup for flow and defining blocks. The ability to have BracketHighlighter understand {{ rather than just { would be very helpful, and i'm willing to put in some time to help achieve this.
Is this plugin geared to do something like this easily?... or is it specifically catered to single bracket types (which is okay as well of course).
Thanks for your work on BracketHighlighter.
I like ST2 because of the clean interface and I also need this package.
It's great, but too much color, maybe if you can just put in an option to toggle between the color-block around the brackets/quotes to a simple colored underline or something, that looks nice & clutter free.
Hoping you get my view, I don't want to change colors n all, but a simpler clutter-free highlighter.
Understanding that the "$ $" math mode in latex is considered a string, is it possible to allow string matching / highlighting in this case?
How do I change these? I seem to only have 1 color, white, for all my tags. Your image appears to show a multitude of colors for different tags.
I'm a Ruby developer and would love to be able to have "def" and "end" tags highlighted for method definitions to help see them aligned properly. Things like this:
if ...
end
def foo
end
while ...
end
until ..
end
Would this be possible with this plugin or is it out of scope?
Thanks!
For example if we have something like this in c++:
{
{
asd( __cursor_here__ );
}
}
Then all brackets would be highlighted, not only the one closest to cursor. Presumably each one with different color
perhaps i'm just not seeing a setting to add highlighting for this extension... any help?
Currently the highlighting styles we have at our disposal are 'solid', 'outline', 'underline', and 'none'
I'd like to propose the addition of an additional option called 'character' that would simply change the font color of the bracket character itself, and not add anything around or under it.
Current threshold is for all selections and not for individual selections. This needs to be reset after each selection match.
Accidentally removed the parentheses around that controlled adj quote logic. These need to be added back in.
Greetings, I am hoping to get BracketHighlighter running well with https://github.com/SublimeText/ColdFusion.
Any help will be much appreciated.
In a Ruby file, I have the following line:
message = "#{self.element_identifier} does not have attribute '#{attribute}'"
Moving left to right with the cursor, the double quotes highlight, the curly braces around self.element_identifier
highlight then lose highlighting, but when the cursor gets to the single quotes around #{attribute}
, they don't get highlighted. The curly braces do, but not the single quotes.
I don't know if this is related, but I also noticed that the double quotes retain their highlighting when the curly braces are highlighted. That seems inconsistent with what I've observed elsewhere.
Hello @faceless user,
If you can, please adhere to the pep8 code convention, try to open your plugin using SublimeLinter.
If you need i can send a patch.
Thanks !
It seems that current version only highlight the bracket if both openning and closing bracket appear in one view page. For example, in long source code file, openning bracket in line 10 and close bracket in line 210 so it wasn't get highlighted.
Hi:
When you write a new file, brackethighligher(BH for short) can hint the pair of bracket of quotes. But if you open a existing file, you will find that it's difficult to find the missed bracket .
Any solutions? Or BH didn't implement this function yet?
If a section of code has more than 4 bracket closures, it won't highlight enclosing parent brackets.
Fedora 17, ST 2.0.1
Instead of defining new scope, why not allowing direct hex color definition across all scopes? It should allow #FFF, as well as #FFFFFF.
Something like:
"quote_scope" : "#ccc",
"curly_scope" : "entity.name.class"...
I know it's not very clean, but it would solve the problem very efficiently. For example, I tried and can't figure out how to define new scope. Theme files do not contain XML you specified (you mentioned that scopes are defined in themes)...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.