Monday, August 8, 2011

Re: Problem

On 08/08/2011 05:10 PM, flipxfx wrote:
> What does this do in Vim?
>
> qa

start recording a macro into register "a"

> 'a

go to the mark named "a" (which strangely doesn't get dropped
until later in this macro)

> ^i--[esc]

insert "--" at the beginning of the line. This could be changed
to just

I--[esc]

as "I" is the same as "^i"

> j

go down one line

> ma

drop the mark named "a" here

> ^

go to the first character on the line

> 2x

delete the first 2 characters

> q

stop recording the macro

> Figure it out and you win!

Now as to *why* one would want to do all this, it's a bit hard to
tell without the text it's expected to be run over.
Additionally, the macro is recorded, but never played back.

-tim


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: