News for hackers. Stuff that matters.
Re:How Did Vim Become So Popular? by gaogao on Wednesday July 01, 2020 @01:14AM (#23697977)
One vim hack I like is multi-line macro application. It's a good fallback in case, as I often forget the syntax for certain things. To facilitate this, I've remapped ctrl-space in visual line mode to apply my `q` macro to every selected line.

As an example, say I need to add a comma to a bunch of lines. I will record the macro on that line appending a comma to the end, visually select all of the other lines to copy the macro on, and then jam my hotkey to apply the macro.

It's often much quicker than reaching for a regex for short segments of code.

Re:How Did Vim Become So Popular? by RMPR on Wednesday July 01, 2020 @03:21AM (#23698721)
FWIW, your particular example is doable with vanilla Vim with the same efficiency (with less strain)

    V<count>j (3)
    :'<,'>norm A, (8 - The angular brackets are automatically added by vim)
Vs

    qq (2)
    A,<ESC> (3)
    q (1)
    V<count>j (3)
    <CTRL><Space> (2)