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

370 active golfers, 2011 entries

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

11/17/2020 at 02:40PM

17
#>69 - Lashoun / @lashoun42

11/17/2020 at 02:41PM

18
#>118 - Lashoun / @lashoun42

11/17/2020 at 02:39PM

21
#>140 - Lashoun / @lashoun42

11/17/2020 at 02:39PM

22
#>147 - Lashoun / @lashoun42

11/17/2020 at 02:38PM

23
#>164 - Lashoun / @lashoun42

11/17/2020 at 02:37PM

24
#>173 - Lashoun / @lashoun42

11/17/2020 at 02:37PM

25
#>179 - Lashoun / @lashoun42

11/17/2020 at 02:36PM

26
#>186 - Lashoun / @lashoun42

11/17/2020 at 02:35PM

27
#>199 - Lashoun / @lashoun42

11/17/2020 at 02:34PM

31
#>241 - Lashoun / @lashoun42

11/17/2020 at 02:34PM

32
#>248 - Lashoun / @lashoun42

11/17/2020 at 02:26PM

32
#>248 - Lashoun / @lashoun42

11/17/2020 at 02:31PM

35
#>283 - Lashoun / @lashoun42

11/17/2020 at 02:23PM

36
#>287 - Lashoun / @lashoun42

11/17/2020 at 02:24PM

38
#>299 - Lashoun / @lashoun42

11/17/2020 at 02:21PM

44
#>323 - Lashoun / @lashoun42

11/17/2020 at 02:17PM