Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 5fa95fbdd285680008e41e4b

swap number pairs

Swap the numbers in a bunch of 2-element arrays.

Start file
[2, 1], [5, 4]
[6, 3]
[7, 4]
[8, 2], [12, 11]
End file
[1, 2], [4, 5]
[3, 6]
[4, 7]
[2, 8], [11, 12]

View Diff

1,4c1,4
< [2, 1], [5, 4]
< [6, 3]
< [7, 4]
< [8, 2], [12, 11]
---
> [1, 2], [4, 5]
> [3, 6]
> [4, 7]
> [2, 8], [11, 12]

Solutions by @boardgame_JP:

Unlock 15 remaining solutions by signing in and submitting your own entry
Created by: @wedesoft

394 active golfers, 2173 entries

Solutions by @boardgame_JP:
17
#96 - ボードゲーム! / @boardgame_JP

07/17/2021 at 10:07PM

18
#>132 - ボードゲーム! / @boardgame_JP

07/17/2021 at 10:06PM

19
#>142 - ボードゲーム! / @boardgame_JP

07/17/2021 at 10:05PM

20
#>146 - ボードゲーム! / @boardgame_JP

07/17/2021 at 09:59PM

21
#>153 - ボードゲーム! / @boardgame_JP

07/17/2021 at 09:58PM

22
#>162 - ボードゲーム! / @boardgame_JP

07/17/2021 at 09:57PM

23
#>178 - ボードゲーム! / @boardgame_JP

07/17/2021 at 09:56PM

24
#>186 - ボードゲーム! / @boardgame_JP

07/17/2021 at 09:55PM

25
#>191 - ボードゲーム! / @boardgame_JP

07/17/2021 at 09:53PM

26
#>200 - ボードゲーム! / @boardgame_JP

07/17/2021 at 09:50PM

27
#>216 - ボードゲーム! / @boardgame_JP

07/17/2021 at 09:48PM

29
#>230 - ボードゲーム! / @boardgame_JP

07/17/2021 at 09:43PM

30
#>244 - ボードゲーム! / @boardgame_JP

07/17/2021 at 09:37PM

58
#>373 - ボードゲーム! / @boardgame_JP

07/17/2021 at 09:22PM

242
#>394 - ボードゲーム! / @boardgame_JP

07/17/2021 at 09:37PM