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

284 active golfers, 1473 entries

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

05/23/2021 at 11:54PM

17
#>75 - Michael / @Michael62785035

05/24/2021 at 12:04AM

18
#>93 - Michael / @Michael62785035

05/23/2021 at 11:51PM

19
#>101 - Michael / @Michael62785035

05/23/2021 at 11:49PM

20
#>102 - Michael / @Michael62785035

05/23/2021 at 11:41PM

21
#>109 - Michael / @Michael62785035

05/23/2021 at 11:37PM

22
#>116 - Michael / @Michael62785035

05/23/2021 at 11:30PM

23
#>128 - Michael / @Michael62785035

05/23/2021 at 11:26PM

25
#>137 - Michael / @Michael62785035

05/23/2021 at 11:22PM

26
#>142 - Michael / @Michael62785035

05/23/2021 at 11:20PM

27
#>150 - Michael / @Michael62785035

05/23/2021 at 11:11PM

27
#>150 - Michael / @Michael62785035

05/23/2021 at 11:17PM

34
#>208 - Michael / @Michael62785035

05/23/2021 at 11:00PM

43
#>244 - Michael / @Michael62785035

05/23/2021 at 10:49PM

46
#>249 - Michael / @Michael62785035

05/23/2021 at 10:39PM