Its really simple to make it smart and use the CMD-X key (dual purpose).
Create a command called "smartcut" with the following:
<br><pre>
#! /bin/sh
#
if [ "x$TM_SELECTED_TEXT" = "x" ]; then
text="$TM_CURRENT_LINE";
else
text="$TM_SELECTED_TEXT";
fi
echo -n "$text"|pbcopy
</pre><br>
Set the input to "Selected Text" or "Line" and the output to "Replace Selected Text". Then set the Key Equivalent to CMD-X
The standard CMD-V will paste the whole like back.
<br><br>
-- dv
<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/about-cut-and-paste-the-whole-line-tp19948444p19959022.html">Re: about cut and paste the whole line</a><br>
Sent from the <a href="http://www.nabble.com/textmate-users-f18157.html">textmate users mailing list archive</a> at Nabble.com.<br>