[TxMt] highlight all instances under cursor
Hans-Joerg Bibiko
bibiko at eva.mpg.de
Tue Feb 12 09:38:20 UTC 2008
On 2 Feb 2008, at 23:49, Jamal Johnson wrote:
> Something like Autotext is def what I'm looking for. I have a
> problem and a question however.
>
>
> My problem is I'm receiving an error and it's not working. I've
> attached a screenshot. I looked through the files for Autotext and
> don't see where (or even what) the problem might be, maybe someone
> can help?
You need to install the TMTOOLS plug-in in beforehand.
http://email.eva.mpg.de/~bibiko/downloads/textmate/
> Question: is there a way to integrate this so it's globally
> accessible so I don't have to change the language of a Java or
> Javascript file in order to use it?
In principal: NO. There would be a way to change the syntax
highlighting at runtime, i.e. find the tmlanguage file, rewrite it,
reload all bundles, etc. but this is really an hack and it only works
at your computer.
A interim and more general solution would be to use the 'Create HTML
From Document / Selection With Line Numbers' approach. Before the
text is send to 'doctohtml.rb' enclose your search pattern by a
unique start and end tag; change 'doctohtml.rb' in such a way that
these start and end tags are replaced by e.g. <span bgcolor=lightblue
onclick="txmt://open?line=LINE;column=COLUMN"> and </span>.
By doing so one should be able to see all instances of the search
pattern and if one clicks at an instance one jumps to it.
Or if one only is interested to visualise all lines in an HTML window
one could use my Hypersearch approach. It's based on the front end
written by Henrik Nyh but instead of using grep it uses my onigrep
(pure utf-8 Oniguruma regexp engine).
Please note: onigrep and the Hyperserach bundle are still under
construction!
Here two screenshots:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hyp1.tiff
Type: image/tiff
Size: 32914 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20080212/6445d48a/attachment.tiff>
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hyp2.tiff
Type: image/tiff
Size: 138990 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20080212/6445d48a/attachment-0001.tiff>
-------------- next part --------------
One can download it here: http://email.eva.mpg.de/~bibiko/downloads/
textmate/
Cheers,
Hans
More information about the textmate
mailing list