[TxMt] erasing block within tags

James Fishwick fishwick.hmco at gmail.com
Fri Nov 10 18:53:13 UTC 2006

I'm trying to write a snippet that will erase

*everything within inclosing tags
*everything with enclosing tags including the tags themselves.

So far I've got `perl -e 's/<\${TM_SELECTED_TEXT}>(\n|.)+?/<\/$ 
{TM_SELECTED_TEXT}>//g'`, input is document, output is new document  
where the user has the word inside a tag selected. This isn't  
working... and it would be better if the user could select the whole  
ending or beginning tag rather than just the word. Any pointers would  
be appreciated.

More information about the textmate mailing list