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

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

340 active golfers, 1838 entries

Solutions by @ColdBear11:
16
#53 - ColdBear / @ColdBear11

12/17/2022 at 02:29PM

17
#>99 - ColdBear / @ColdBear11

12/17/2022 at 02:27PM

18
#>117 - ColdBear / @ColdBear11

12/17/2022 at 02:26PM

19
#>120 - ColdBear / @ColdBear11

12/17/2022 at 02:25PM

20
#>123 - ColdBear / @ColdBear11

12/17/2022 at 02:23PM

21
#>130 - ColdBear / @ColdBear11

12/17/2022 at 02:22PM

22
#>142 - ColdBear / @ColdBear11

12/17/2022 at 02:20PM

23
#>152 - ColdBear / @ColdBear11

12/17/2022 at 02:19PM

24
#>157 - ColdBear / @ColdBear11

12/17/2022 at 02:18PM

25
#>163 - ColdBear / @ColdBear11

12/17/2022 at 02:16PM

26
#>175 - ColdBear / @ColdBear11

12/17/2022 at 02:07PM

26
#>175 - ColdBear / @ColdBear11

12/17/2022 at 02:11PM

27
#>187 - ColdBear / @ColdBear11

12/17/2022 at 02:06PM

30
#>214 - ColdBear / @ColdBear11

12/17/2022 at 02:03PM

32
#>238 - ColdBear / @ColdBear11

12/17/2022 at 02:01PM

34
#>252 - ColdBear / @ColdBear11

12/17/2022 at 01:57PM

36
#>263 - ColdBear / @ColdBear11

12/17/2022 at 01:55PM

38
#>273 - ColdBear / @ColdBear11

12/17/2022 at 01:52PM

47
#>304 - ColdBear / @ColdBear11

12/17/2022 at 01:46PM