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

369 active golfers, 2002 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
#>123 - Michael / @Michael62785035

05/23/2021 at 11:51PM

19
#>133 - Michael / @Michael62785035

05/23/2021 at 11:49PM

20
#>135 - Michael / @Michael62785035

05/23/2021 at 11:41PM

21
#>142 - Michael / @Michael62785035

05/23/2021 at 11:37PM

22
#>150 - Michael / @Michael62785035

05/23/2021 at 11:30PM

23
#>167 - Michael / @Michael62785035

05/23/2021 at 11:26PM

25
#>179 - Michael / @Michael62785035

05/23/2021 at 11:22PM

26
#>186 - Michael / @Michael62785035

05/23/2021 at 11:20PM

27
#>201 - Michael / @Michael62785035

05/23/2021 at 11:11PM

27
#>201 - Michael / @Michael62785035

05/23/2021 at 11:17PM

34
#>274 - Michael / @Michael62785035

05/23/2021 at 11:00PM

43
#>322 - Michael / @Michael62785035

05/23/2021 at 10:49PM

46
#>329 - Michael / @Michael62785035

05/23/2021 at 10:39PM