On 30.12.2007, at 20:13, Sergei Yakovlev wrote:
It would certainly be easier for the average user (and somewhat more flexible) if TextMate had something like $TM_SELECTED_TEXT_START_LINE_NUMBER and $TM_SELECTED_TEXT_START_COLUMN_NUMBER variables, or, alternatively, slightly changed semantics of $TM_LINE_NUMBER and $TM_COLUMN_NUMBER variables so that they always return the starting position of selection (no matter how the selection was made).
Do you know these variables? $TM_INPUT_START_LINE $TM_INPUT_START_LINE_INDEX
Try this tiny attached tmcommand.
in BASH:
echo "start line : $TM_INPUT_START_LINE" echo "start index: $TM_INPUT_START_LINE_INDEX" echo "length : ${#TM_SELECTED_TEXT}"
--Hans