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

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

390 active golfers, 2146 entries

Solutions by @lashoun42:
17
#73 - Lashoun / @lashoun42

11/17/2020 at 02:40PM

17
#>73 - Lashoun / @lashoun42

11/17/2020 at 02:41PM

18
#>124 - Lashoun / @lashoun42

11/17/2020 at 02:39PM

21
#>148 - Lashoun / @lashoun42

11/17/2020 at 02:39PM

22
#>155 - Lashoun / @lashoun42

11/17/2020 at 02:38PM

23
#>172 - Lashoun / @lashoun42

11/17/2020 at 02:37PM

24
#>181 - Lashoun / @lashoun42

11/17/2020 at 02:37PM

25
#>188 - Lashoun / @lashoun42

11/17/2020 at 02:36PM

26
#>195 - Lashoun / @lashoun42

11/17/2020 at 02:35PM

27
#>209 - Lashoun / @lashoun42

11/17/2020 at 02:34PM

31
#>253 - Lashoun / @lashoun42

11/17/2020 at 02:34PM

32
#>260 - Lashoun / @lashoun42

11/17/2020 at 02:26PM

32
#>260 - Lashoun / @lashoun42

11/17/2020 at 02:31PM

35
#>296 - Lashoun / @lashoun42

11/17/2020 at 02:23PM

36
#>300 - Lashoun / @lashoun42

11/17/2020 at 02:24PM

38
#>312 - Lashoun / @lashoun42

11/17/2020 at 02:21PM

44
#>341 - Lashoun / @lashoun42

11/17/2020 at 02:17PM