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 @2_71828:

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

390 active golfers, 2146 entries

Solutions by @2_71828:
17
#77 - Adam Stephen / @2_71828

11/29/2020 at 11:12AM

18
#>129 - Adam Stephen / @2_71828

11/28/2020 at 09:47PM

21
#>150 - Adam Stephen / @2_71828

11/28/2020 at 09:46PM

22
#>155 - Adam Stephen / @2_71828

11/28/2020 at 09:41PM

23
#>172 - Adam Stephen / @2_71828

11/28/2020 at 09:40PM

24
#>181 - Adam Stephen / @2_71828

11/28/2020 at 09:39PM

25
#>188 - Adam Stephen / @2_71828

11/28/2020 at 09:39PM

26
#>196 - Adam Stephen / @2_71828

11/28/2020 at 09:33PM

26
#>196 - Adam Stephen / @2_71828

11/28/2020 at 09:36PM

27
#>209 - Adam Stephen / @2_71828

11/28/2020 at 06:45PM

30
#>232 - Adam Stephen / @2_71828

11/28/2020 at 06:39PM

32
#>261 - Adam Stephen / @2_71828

11/28/2020 at 06:25PM

35
#>296 - Adam Stephen / @2_71828

11/28/2020 at 06:22PM

41
#>333 - Adam Stephen / @2_71828

11/28/2020 at 06:18PM

58
#>369 - Adam Stephen / @2_71828

11/28/2020 at 06:10PM