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

390 active golfers, 2146 entries

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

05/23/2021 at 11:54PM

17
#>92 - Michael / @Michael62785035

05/24/2021 at 12:04AM

18
#>130 - Michael / @Michael62785035

05/23/2021 at 11:51PM

19
#>141 - Michael / @Michael62785035

05/23/2021 at 11:49PM

20
#>144 - Michael / @Michael62785035

05/23/2021 at 11:41PM

21
#>151 - Michael / @Michael62785035

05/23/2021 at 11:37PM

22
#>159 - Michael / @Michael62785035

05/23/2021 at 11:30PM

23
#>176 - Michael / @Michael62785035

05/23/2021 at 11:26PM

25
#>189 - Michael / @Michael62785035

05/23/2021 at 11:22PM

26
#>196 - Michael / @Michael62785035

05/23/2021 at 11:20PM

27
#>212 - Michael / @Michael62785035

05/23/2021 at 11:11PM

27
#>212 - Michael / @Michael62785035

05/23/2021 at 11:17PM

34
#>287 - Michael / @Michael62785035

05/23/2021 at 11:00PM

43
#>339 - Michael / @Michael62785035

05/23/2021 at 10:49PM

46
#>349 - Michael / @Michael62785035

05/23/2021 at 10:39PM