Array transposition

http://www.vimgolf.com/challenges/596dd9ca448256000c000011

Best vim score: 16

Array transposition

Transpose two arrays into one.

Start file:

[1,2,3,4,5,6,7,8,9,0]
[a,b,c,d,e,f,g,h,i,j]

End file:

[1,a,2,b,3,c,4,d,5,e,6,f,7,g,8,h,9,i,0,j]

14 with xs\d<ret>yjPi,<esc>kxd, pretty straightforward solution. Multiple selections really shine on this one.

1 Like

@occivink You’ve missed the ,q at the end, so it’s 16. But if yours works, you could replace yj with yX<a-d> and remove kxd, which should make it 14 again.

Right, I forgot about that part. Unfortunately yX<a-d> doesn’t work, because we need to move the 10 selections to the second line.

We matched vim – so a PAR!