Hacker News new | ask | show | jobs
by contras1970 2610 days ago
this is somewhat shorter:

    qq0i"<Esc>A",<Esc>jq@@
i agree this example is silly. i'd do something like

    :%s/.*/"&",/
1 comments

Yeah, it is a toy example on purpose.

Macros really shine when you need to do a bit more complex stuff, there is certainly a cutoff between ease of regex "from the top of my head" vs. spending time formulating it.