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

384 active golfers, 2115 entries

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

11/29/2020 at 11:12AM

18
#>127 - Adam Stephen / @2_71828

11/28/2020 at 09:47PM

21
#>147 - Adam Stephen / @2_71828

11/28/2020 at 09:46PM

22
#>152 - Adam Stephen / @2_71828

11/28/2020 at 09:41PM

23
#>169 - Adam Stephen / @2_71828

11/28/2020 at 09:40PM

24
#>178 - Adam Stephen / @2_71828

11/28/2020 at 09:39PM

25
#>184 - Adam Stephen / @2_71828

11/28/2020 at 09:39PM

26
#>192 - Adam Stephen / @2_71828

11/28/2020 at 09:33PM

26
#>192 - Adam Stephen / @2_71828

11/28/2020 at 09:36PM

27
#>205 - Adam Stephen / @2_71828

11/28/2020 at 06:45PM

30
#>228 - Adam Stephen / @2_71828

11/28/2020 at 06:39PM

32
#>257 - Adam Stephen / @2_71828

11/28/2020 at 06:25PM

35
#>292 - Adam Stephen / @2_71828

11/28/2020 at 06:22PM

41
#>327 - Adam Stephen / @2_71828

11/28/2020 at 06:18PM

58
#>363 - Adam Stephen / @2_71828

11/28/2020 at 06:10PM