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

394 active golfers, 2173 entries

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

11/17/2020 at 02:40PM

17
#>74 - Lashoun / @lashoun42

11/17/2020 at 02:41PM

18
#>125 - Lashoun / @lashoun42

11/17/2020 at 02:39PM

21
#>150 - Lashoun / @lashoun42

11/17/2020 at 02:39PM

22
#>157 - Lashoun / @lashoun42

11/17/2020 at 02:38PM

23
#>174 - Lashoun / @lashoun42

11/17/2020 at 02:37PM

24
#>183 - Lashoun / @lashoun42

11/17/2020 at 02:37PM

25
#>190 - Lashoun / @lashoun42

11/17/2020 at 02:36PM

26
#>197 - Lashoun / @lashoun42

11/17/2020 at 02:35PM

27
#>211 - Lashoun / @lashoun42

11/17/2020 at 02:34PM

31
#>255 - Lashoun / @lashoun42

11/17/2020 at 02:34PM

32
#>262 - Lashoun / @lashoun42

11/17/2020 at 02:26PM

32
#>262 - Lashoun / @lashoun42

11/17/2020 at 02:31PM

35
#>298 - Lashoun / @lashoun42

11/17/2020 at 02:23PM

36
#>302 - Lashoun / @lashoun42

11/17/2020 at 02:24PM

38
#>314 - Lashoun / @lashoun42

11/17/2020 at 02:21PM

44
#>343 - Lashoun / @lashoun42

11/17/2020 at 02:17PM