[TxMt] Copy and Duplicate word snippet

Helmut Granda contact at helmutgranda.com
Wed Jan 24 16:48:13 UTC 2007


Hello all,

I am trying to find information in regards of how to copy and paste text in
a new line, for example:

before snippet:

myText

after snippet:

myText
theText = myText

currently I am able to create a snippet that will copy the selected word and
create a new line like this:

theText = $TM_SELECTED_TEXT

but of course this replaces the selected text so I did the following

$TM_SELECTED_TEXT
theText = $TM_SELECTED_TEXT

and this works great if there is only one line of text but lets say I need
to select a certain word in the middle of a pharragraph then i get the
following

before snippet:
first word theText second word

after snippet:
first word theText theText = theText second word

as you can tell the snippet inserts the comman din the middle of the
sentence, is there a way to avoid that?

TIA
Helmut
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20070124/ddec5cee/attachment.html>


More information about the textmate mailing list