I was blown away by the HTML demo on the Textmate site, the ability to insert matching tags and intelligently tab through them seems like a great way to create HTML. The fact that I can surround a selection and edit BOTH start/end tags at the same time had my jaw dropping.
However, this 'magic' behavior seems to vanish once I leave the vicinity of the tag. If I return (or edit an existing file, when I select a start tag, it doesn't auto edit the closing tag.
I get how doing this automatically would create some problems. I'm just looking for a way to someone 'refocus' Textmate on the tag in question, matching the start end tags so when I reedit one, the other changes.
Through the hundreds of commands in Textmate, i assume there is someway to do this. Any one have any ideas?
Thanks,
Scott
On 15. Nov 2006, at 15:29, Scott Jenson wrote:
I was blown away by the HTML demo on the Textmate site, the ability to insert matching tags and intelligently tab through them seems like a great way to create HTML. The fact that I can surround a selection and edit BOTH start/end tags at the same time had my jaw dropping.
However, this 'magic' behavior seems to vanish once I leave the vicinity of the tag. If I return (or edit an existing file, when I select a start tag, it doesn't auto edit the closing tag.
And there is no way to get it back, sorry.
However, can't I do something clever with the thousands of commands hidden in this cool app?
For example: 1) Select enclosing tags 2) remove tags 3) wrap selection in open/close tag?
I believe that 2 and 3 already exist. Is there any way to do #1, select enclosing tags? That seems useful for all sorts of uses beyond just this particular case.
Scott
On 11/15/06, Allan Odgaard throw-away-1@macromates.com wrote:
On 15. Nov 2006, at 15:29, Scott Jenson wrote:
I was blown away by the HTML demo on the Textmate site, the ability to insert matching tags and intelligently tab through them seems like a great way to create HTML. The fact that I can surround a selection and edit BOTH start/end tags at the same time had my jaw dropping.
However, this 'magic' behavior seems to vanish once I leave the vicinity of the tag. If I return (or edit an existing file, when I select a start tag, it doesn't auto edit the closing tag.
And there is no way to get it back, sorry.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 15. Nov 2006, at 21:41, Scott Jenson wrote:
However, can't I do something clever with the thousands of commands hidden in this cool app?
For example: 1) Select enclosing tags 2) remove tags 3) wrap selection in open/close tag?
I believe that 2 and 3 already exist. Is there any way to do #1, select enclosing tags? That seems useful for all sorts of uses beyond just this particular case.
You could make a command which takes document as stdin and outputs a snippet with the things properly setup -- but it would have a slight performance cost for transforming the entire document. We’re (most likely) going to markup start/end tags in the grammar to make it easier to do commands that take “current scope” as input, although some things here have not been worked out yet (how to select the inner-most scope when there are nested elements using the same scope name).