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

370 active golfers, 2011 entries

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

07/17/2021 at 10:07PM

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

07/17/2021 at 10:06PM

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

07/17/2021 at 10:05PM

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

07/17/2021 at 09:59PM

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

07/17/2021 at 09:58PM

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

07/17/2021 at 09:57PM

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

07/17/2021 at 09:56PM

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

07/17/2021 at 09:55PM

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

07/17/2021 at 09:53PM

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

07/17/2021 at 09:50PM

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

07/17/2021 at 09:48PM

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

07/17/2021 at 09:43PM

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

07/17/2021 at 09:37PM

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

07/17/2021 at 09:22PM

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

07/17/2021 at 09:37PM