Each row is:
Or(a=a[0], b=b[0], out=out[0]);
Or(a=a[0], b=b[0], out=out[0]);
Or(a=a[0], b=b[0], out=out[0]);
and I need:
Or(a=a[0], b=b[0], out=out[0]);
Or(a=a[1], b=b[1], out=out[1]);
Or(a=a[2], b=b[2], out=out[2]);
I tried this solution as:
:let t=[] # then ctrl-v
:s/\d/\=len(add(t,1))/g
But this increments each subsequent number, not per row. I couldn't find/understand other solutions.
Thank you!
:help v_g_CTRL-A. Thanks, @fbence! – Phil R Jul 20 '22 at 17:43v_g_^ais dotable (.works), as any command. Just put your cursor on the second column, no need to enter visual mode again (that wouldn't work). – Biggybi Jul 20 '22 at 19:44