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

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

381 active golfers, 2104 entries

Solutions by @JohnDoe75830353:
17
#83 - John Doe / @JohnDoe75830353

12/21/2020 at 01:43AM

18
#>127 - John Doe / @JohnDoe75830353

12/21/2020 at 01:41AM

20
#>140 - John Doe / @JohnDoe75830353

12/21/2020 at 01:39AM

20
#>140 - John Doe / @JohnDoe75830353

12/21/2020 at 01:40AM

21
#>146 - John Doe / @JohnDoe75830353

12/21/2020 at 01:38AM

22
#>154 - John Doe / @JohnDoe75830353

12/21/2020 at 01:35AM

24
#>178 - John Doe / @JohnDoe75830353

12/21/2020 at 01:33AM

25
#>184 - John Doe / @JohnDoe75830353

12/21/2020 at 01:30AM

26
#>191 - John Doe / @JohnDoe75830353

12/21/2020 at 01:24AM

27
#>206 - John Doe / @JohnDoe75830353

12/21/2020 at 01:21AM

28
#>218 - John Doe / @JohnDoe75830353

12/21/2020 at 01:19AM

30
#>230 - John Doe / @JohnDoe75830353

12/21/2020 at 01:17AM

31
#>247 - John Doe / @JohnDoe75830353

12/21/2020 at 01:15AM

32
#>260 - John Doe / @JohnDoe75830353

12/20/2020 at 09:27PM

34
#>279 - John Doe / @JohnDoe75830353

12/20/2020 at 09:24PM

36
#>294 - John Doe / @JohnDoe75830353

12/20/2020 at 09:05PM

38
#>306 - John Doe / @JohnDoe75830353

12/20/2020 at 09:04PM

47
#>341 - John Doe / @JohnDoe75830353

12/20/2020 at 08:45PM

53
#>355 - John Doe / @JohnDoe75830353

12/20/2020 at 08:59PM