[TxMt] Snippet Overtype

Craig Francis craig.francis at europe.mccann.com
Wed Feb 7 16:44:34 UTC 2007


On 7 Feb 2007, at 16:09, Dr. Drang wrote:

> Heading
> =======
>
> What I wrote was a TextMate macro/command combination that figured  
> out how long the text was and added the same number of hyphens or  
> equals under it.


Thanks, but its sort of the inverse of what I need (the line stats  
the same in my date).

However, I wonder if this might help you...


# Open the Bundle Editor
# Create a new Snippet (bottom left "+" drop down)
# Set the "Edit Snippet" field to the text between the hyphens (don't  
include them)

--------------------------------------------------
$1
${1/./=/g}
--------------------------------------------------

# Set the activation to "Tab Trigger" and the value to something like  
"h"
# Clear the scope selector (unless you want to limit its usage)


Now, when you want to create a heading, you can type "h" in your  
document, press the [tab] key and type out the heading... the  
underline should be automatically created for you.


This message contains information which may be confidential and privileged.Unless you
are the intended recipient (or authorized to receive this message for the intended
recipient), you may not use, copy, disseminate or disclose to anyone the message or
any information contained in the message. If you have received the message in error,
please advise the sender by reply e-mail, and delete the message.
Thank you very much.
(A)



More information about the textmate mailing list