Its really simple to make it smart and use the CMD-X key (dual purpose).
Create a command called "smartcut" with the following:
#! /bin/sh
#
if [ "x$TM_SELECTED_TEXT" = "x" ]; then
text="$TM_CURRENT_LINE";
else
text="$TM_SELECTED_TEXT";
fi
echo -n "$text"|pbcopy
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.
-- dv
View this message in context: Re: about cut and paste the whole line
Sent from the textmate users mailing list archive at Nabble.com.