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

370 active golfers, 2011 entries

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

11/29/2020 at 11:12AM

18
#>123 - Adam Stephen / @2_71828

11/28/2020 at 09:47PM

21
#>142 - Adam Stephen / @2_71828

11/28/2020 at 09:46PM

22
#>147 - Adam Stephen / @2_71828

11/28/2020 at 09:41PM

23
#>164 - Adam Stephen / @2_71828

11/28/2020 at 09:40PM

24
#>173 - Adam Stephen / @2_71828

11/28/2020 at 09:39PM

25
#>179 - Adam Stephen / @2_71828

11/28/2020 at 09:39PM

26
#>187 - Adam Stephen / @2_71828

11/28/2020 at 09:33PM

26
#>187 - Adam Stephen / @2_71828

11/28/2020 at 09:36PM

27
#>199 - Adam Stephen / @2_71828

11/28/2020 at 06:45PM

30
#>222 - Adam Stephen / @2_71828

11/28/2020 at 06:39PM

32
#>249 - Adam Stephen / @2_71828

11/28/2020 at 06:25PM

35
#>283 - Adam Stephen / @2_71828

11/28/2020 at 06:22PM

41
#>317 - Adam Stephen / @2_71828

11/28/2020 at 06:18PM

58
#>350 - Adam Stephen / @2_71828

11/28/2020 at 06:10PM