[TxMt] Re: [ html ] selecting text between tags

thomas Aylott thomas.42 at gmail.com
Sun Feb 5 17:54:36 UTC 2006


I've written a couple of pretty handy macros that do something pretty  
handy, although not precisely what you guys are talking about.

Check out the ScreenCast!
http://subtlegradient.com/articles/2006/02/05/my_textmate_bundles_etc

You place your caret inside something and the macro will select  
everything in between enclosing characters. It's kinda like the  
balance command, except it grabs everything INSIDE the characters,  
but not the characters themselves.

it works with:

[], {}, (), '', "", word="", <>, ><, $word, @word, /* word */, <%  
word %>, <%= word %>, <%# word %>, <%@ word %>, integers, and  
probably more, but I forget now.


How it applies to this conversation. If you want to select the  
"paragraph text" section of the following HTML, place your caret  
somewhere in the text and hit the macro. It'll select everything  
between the > & < characters.

<p class="blah">
  	paragraph text
</p>

It's hip, you'll hate it!



On Feb 5, 2006, at 4:39 AM, Alain Ravet wrote:

> JetBrains' IDEA has a superior and simple solution to this problem:  
> expanding areas selection. This is one of the features I miss the  
> most in Textmate.
>
> "expanding areas selection:"
> "Ctrl+W (select word) in the editor selects a word at the caret and  
> then selects expanding areas of the source code. For example, it  
> may select a method name, then the expression that calls this  
> method, then the whole statement, then the containing block, etc."
>
> , and "Shift-Ctrl+W" is the reverse action.
>
>
> And if you use CamelHumps, Ctrl-W will play it smart by stopping on  
> Humps.
>
>
> Alain




More information about the textmate mailing list