Home Download Buy Blog Forum Support

TagMatcher and WordHighlight

TagMatcher and WordHighlight

Postby Keyamoon on Sat Jan 07, 2012 12:55 pm

There are two very useful features that are missing.

Highlighting Matching Tags:

Although Sublime Text 2 does match tags, but it only shows a little dotted underline; which is not very visual. To fix this, there is this TagMatcher plugin which is unfortunately very slow; especially when you're editing large files. Notepad++ has implemented this feature and it works like a charm there. It never causes any glitches, even in gigantic files.

Highlighting matching words on select:

This can be very useful when you want to quickly find where else in your code, you have used a word (a variable name for example). There is a plugin called "WordHighlight" which has the same issue as the TagMatcher plugin. It's slow and causes crashes and errors when working with rather large files. This feature is also properly implemented in notepad++, without any glitches.

So I would like to ask a native implementation of these two very useful features.
Keyamoon
 
Posts: 7
Joined: Wed Sep 21, 2011 10:27 am

Re: TagMatcher and WordHighlight

Postby facelessuser on Sat Jan 07, 2012 6:10 pm

You can try BracketHighlighter which fixes a number of issues that SublimeBracket and SublimeTagmatcher had and adds features. Large file issues is what caused me to create it.

I don't have an alternative suggestion for WordHighlight though. I do think WordHighlight could be implemented to be kinder in really large files. It seems to search the entire file on every selection change. Search the entire file can bog things down.
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: TagMatcher and WordHighlight

Postby Keyamoon on Sat Jan 07, 2012 8:39 pm

Just tired your plugin. It has a long delay which is very annoying. And I know this delay is probably there to prevent the issues that those other plugins have. But like I said, notepad++ implements the same functionality, without any delay, and it works like a charm even in gigantic files.
Keyamoon
 
Posts: 7
Joined: Wed Sep 21, 2011 10:27 am

Re: TagMatcher and WordHighlight

Postby C0D312 on Sat Jan 07, 2012 9:20 pm

I believe the lastest version of wordhighlight will not highlight if the file size is over a certain size. Additionally, there is now a menu item to quickly enable and disable it. There is still some work to be done to fix the large file issue.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: TagMatcher and WordHighlight

Postby facelessuser on Sun Jan 08, 2012 1:49 am

Keyamoon wrote:Just tired your plugin. It has a long delay which is very annoying. And I know this delay is probably there to prevent the issues that those other plugins have. But like I said, notepad++ implements the same functionality, without any delay, and it works like a charm even in gigantic files.



I used to use Notepad++ on Windows as well, so I am well aware of what you are talking about. Keep in mind, the plugin is not native code, so there is some overhead in with the scripting.

You are correct, the delay is to prevent the issues that other plugins have. I wouldn't say it is a long delay, but it does feel that way at first because you are used to instantaneous highlighting. But I will be honest when I say this; how often to you need instantaneous highlighting. Matching brackets isn't usually something I need to aware of 100% of the time right that instance. It is a nice guide that is there when you need it.

You can adjust the delay and such to your liking in the settings file, or not use the plugin at all if you do in fact find it too annoying. I honestly think if you used it a while, the delay would be insignificant, but everyone is different, but at least you know it is an option.
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: TagMatcher and WordHighlight

Postby Keyamoon on Sun Jan 08, 2012 1:29 pm

So can we please get a native implementation of TagMatcher? :cry:
Keyamoon
 
Posts: 7
Joined: Wed Sep 21, 2011 10:27 am

Re: TagMatcher and WordHighlight

Postby ajpalkovic on Mon Jan 09, 2012 1:17 am

This is a much faster word highlight plugin. It only scans the current visible text, rather than the entire document which makes it a hell of a lot faster.
viewtopic.php?f=5&t=2255
ajpalkovic
 
Posts: 142
Joined: Fri Jun 10, 2011 10:21 pm

Re: TagMatcher and WordHighlight

Postby facelessuser on Sun Jan 15, 2012 9:56 pm

ajpalkovic wrote:This is a much faster word highlight plugin. It only scans the current visible text, rather than the entire document which makes it a hell of a lot faster.
viewtopic.php?f=5&t=2255


Got around to trying your version of word highlight. Very nice approach; I will be keeping this around.

I made a couple of changes to suite my tastes: only highlight word when the whole word is selected, and tweaked the highlight style, but I am very pleased with this version. You should take the time to package this up and put it on Package Control. A lot people use WordHighlight, but it has its issues, so I imagine a lot of people would use your version as well.

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

Re: TagMatcher and WordHighlight

Postby tito on Sun Jan 15, 2012 11:22 pm

facelessuser: its funny to read from you that "wordhighlight" has issues because sometimes shows the "slow plugin" message for taking tiny "ms", when in your plugin (BracketHighlighter) you hacked the "sublime timer" to hide the "slow plugin" error for your plugin. Regards, :lol:
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 860
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: TagMatcher and WordHighlight

Postby sublimator on Mon Jan 16, 2012 12:19 am

@facelessuser

let it go :)
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Next

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 7 guests