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 @Michael62785035:

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

370 active golfers, 2011 entries

Solutions by @Michael62785035:
17
#88 - Michael / @Michael62785035

05/23/2021 at 11:54PM

17
#>88 - Michael / @Michael62785035

05/24/2021 at 12:04AM

18
#>124 - Michael / @Michael62785035

05/23/2021 at 11:51PM

19
#>134 - Michael / @Michael62785035

05/23/2021 at 11:49PM

20
#>136 - Michael / @Michael62785035

05/23/2021 at 11:41PM

21
#>143 - Michael / @Michael62785035

05/23/2021 at 11:37PM

22
#>151 - Michael / @Michael62785035

05/23/2021 at 11:30PM

23
#>168 - Michael / @Michael62785035

05/23/2021 at 11:26PM

25
#>180 - Michael / @Michael62785035

05/23/2021 at 11:22PM

26
#>187 - Michael / @Michael62785035

05/23/2021 at 11:20PM

27
#>202 - Michael / @Michael62785035

05/23/2021 at 11:11PM

27
#>202 - Michael / @Michael62785035

05/23/2021 at 11:17PM

34
#>275 - Michael / @Michael62785035

05/23/2021 at 11:00PM

43
#>323 - Michael / @Michael62785035

05/23/2021 at 10:49PM

46
#>330 - Michael / @Michael62785035

05/23/2021 at 10:39PM