On Jan 25, 2005, at 12:14, Mats Persson wrote:
Well, my original e-mail didn't make it to the list, so I guess it got stuck in Allan's inbox : )
While doing this, I am missing the "Insert Closing Tag" functionality of HTML, and started wondering about how I could extend it to handle the basic UBB tags as well. Unfortunately I didn't get very far as I can't really see the starting point. :( Ideally it would be great to have a syntax .tmbundle that made [b]bold[/b] and so on. Anyone has any ideas or input to help with ??
OK, sometimes I just absolutely LOVE TM !!! The above problem was so easily solved with TM's Snippet functionality that I feel ashamed I didn't think about it earlier.
Bold Snippet: Code: [b]`echo $TM_SELECTED_TEXT`$0[/b] Key Equivelent: Cmd+B
replace the 'b' with 'i', 'u' and so on for all the others.
Time spent creating a working solution once I worked out how = 2 minutes !! Try to do that with any other code/text editor !! Is it even possible ??
On 25 Jan 2005, at 11:29, Allan Odgaard wrote:
When I do emacs marks it should be possible to do a naive version with a macro (search back, copy tag, back to mark, paste/modify). When I do full backwards searching for regular expressions, it should even be possible to do a version that accommodates nesting (and scripting support will be yet another solution).
But of course none of that helps you currently...
Well, you did by making TM such a wonderful app !!! When I get rich, I'll buy you a Ferrari ! :)
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -