[TxMt] A fix for Move Selection Line Up/Down and suggestions for TextMate

Hans-Jörg Bibiko bibiko at eva.mpg.de
Sun Dec 30 23:04:42 UTC 2007


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sel_test.tmCommand
Type: application/octet-stream
Size: 705 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20071231/36a72995/attachment.tmCommand>


More information about the textmate mailing list