[TextMate] Selecting tags and their contents
John Marstall
john at firewheeldesign.com
Wed Oct 6 17:39:34 UTC 2004
This is something I've longed for but have never seen it in any text
editor yet: the ability to simply select markup tags and/or their
enclosed contents. Most editors follow the selection logic of word >
line, which IMO is rarely useful in working with code.
What I'd like is an assortment of modifier-clicks (command-click,
option-click, command-shift-click, option-shift-click, etc.) that
perform the following:
(when the pointer is inside a tag)
- single-click selection of the current, single tag
- single-click selection of the current tag, its corresponding
opening/closing tag, and everything in between
(when the pointer is between two tags)
- single-click selection of everything between the two most immediate
tags (and excluding the tags themselves), with perhaps additional
clicks casting wider and wider inter-tag selections (going from
<td>[selection]</td> to <tr>[<td>selection</td>]</tr>, for example)
Some items (like the <div> tag in HTML syntax mode) are already being
treated as collapsible objects now, but there's no way (AFAIK) to grab
such an object and move it around without carefully selecting the whole
thing character-to-character. This seems like a needless restriction to
me.
Hope that's helpful.
John
More information about the textmate
mailing list