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

340 active golfers, 1838 entries

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

07/17/2021 at 10:07PM

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

07/17/2021 at 10:06PM

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

07/17/2021 at 10:05PM

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

07/17/2021 at 09:59PM

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

07/17/2021 at 09:58PM

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

07/17/2021 at 09:57PM

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

07/17/2021 at 09:56PM

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

07/17/2021 at 09:55PM

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

07/17/2021 at 09:53PM

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

07/17/2021 at 09:50PM

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

07/17/2021 at 09:48PM

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

07/17/2021 at 09:43PM

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

07/17/2021 at 09:37PM

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

07/17/2021 at 09:22PM

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

07/17/2021 at 09:37PM