[TextMate] Re: Working with selections and macros/commands?

Allan Odgaard allan at macromates.com
Sun Oct 10 03:25:04 UTC 2004


On 10. Oct 2004, at 5:07, bongoman wrote:

> But no go. What I want to achieve is to comment out the current line,
> not a selected line. So wherever the caret is when I invoke the
> command gives me a commented single line.

Record it as a macro, do something like:

    start macro recording,
    select line, (option-l or Edit / Select / Line),
    Text / Filter Through Command: 'echo // $TM_CURRENT_LINE'
    arrow left (just to unselect),
    stop macro recording.

As mentioned in the other email, you can also use regex-replace instead 
of shell-piping -- only a matter of personal preferences I guess ;)


ind regards Allan




More information about the textmate mailing list