[TxMt] [ANN] Select Balanced HTML Tag!!!1!

Hans-Jörg Bibiko bibiko at eva.mpg.de
Fri Nov 16 10:41:01 UTC 2007


On 15.11.2007, at 19:50, Saul Rosenbaum wrote:
> rock on! -- that's great...
First of all: yes, I agree, it's an awesome macro ;)

But I encounter further tiny problems.

1)
I'd prefer to not use the local clipboard for that macro

2)
The macro doesn't work for such an HTML:


<html>
<head>
	<title>title</title>
	<style type="text/css" media="screen">
	p {
	    color: red;
	}
	</style>
</head>
<body>
<p>Test <i>bla</i>sak{j}d(sahdskjdh)sadasl
sakd</p>
</body></html>


If you delete <title>..</title> it works
If you leave <title> and delete <style> instead it also works
BTW: I don't know why.

3)
If you place the caret inside of '()' or '{}' it matches these  
brackets first. No problem redo it.

4)
To use the undo function for going back it's awesome too, but it  
could be a bit confusing if one wants to really undo something. One  
has to do it at east twice.

5)
Sometimes the entire window is scrolled to right side after  
selecting. This is maybe an issue of the length of some lines if one  
has switch off 'soft wrap'.

6)
Instead of using CARET_WAS_HERE and ², ³ I'd prefer to use unused  
unicode code points like \UFFFF0 -\UFFF9



By myself I also tried it with TMTOOLS. In principal it works, it's  
also faster, but there are other tiny things.

On the other hand TM has that selectBlock: function built-in. I don't  
know whether it would be possible for Allan to modify that function  
in order to get rid of it, because this feature is actually a very  
essential one, by my opinion.


Nevertheless, it's a very cool approach ;)

Cheers,

--Hans




More information about the textmate mailing list