[TxMt] Re: about cut and paste the whole line

Fred B fredb7 at gmail.com
Mon Oct 13 06:34:23 UTC 2008


On Mon, Oct 13, 2008 at 5:40 AM, Steve Chu <stvchu at gmail.com> wrote:
> Hi, all,
>
> I'v been a Vim user for a long time. There's a shortcut 'dd' in vim
> command mode to cut a line, then use 'yy' to paste it. I haven't found
> any corresponding way to make this done in textmate, could anybody
> here give some advise? Thanks in advance.

There might be others ways to do it, but macros are simple:

- Start Recording a macro (Look in Bundles > Macros)
- Type ⇧⌘L (Edit > Select > Line)
- Type ⌘X (cut)
- Stop Recording macro
- Save Last Recording (e.g. in YourName's Bundle)
- Uncheck "Use local clipboard (...)". Important if you want to be  
able to paste it after.
- Give it an unused key equivalent (the hardest part ;). I use ⌘⌥X.

Now cut lines. ;)

Regards.

--  
FredB



More information about the textmate mailing list