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

87 active golfers, 434 entries

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

11/17/2020 at 02:40PM

17
#>19 - Lashoun / @lashoun42

11/17/2020 at 02:41PM

18
#>30 - Lashoun / @lashoun42

11/17/2020 at 02:39PM

21
#>37 - Lashoun / @lashoun42

11/17/2020 at 02:39PM

22
#>40 - Lashoun / @lashoun42

11/17/2020 at 02:38PM

23
#>44 - Lashoun / @lashoun42

11/17/2020 at 02:37PM

24
#>45 - Lashoun / @lashoun42

11/17/2020 at 02:37PM

25
#>46 - Lashoun / @lashoun42

11/17/2020 at 02:36PM

26
#>49 - Lashoun / @lashoun42

11/17/2020 at 02:35PM

27
#>51 - Lashoun / @lashoun42

11/17/2020 at 02:34PM

31
#>60 - Lashoun / @lashoun42

11/17/2020 at 02:34PM

32
#>66 - Lashoun / @lashoun42

11/17/2020 at 02:26PM

32
#>66 - Lashoun / @lashoun42

11/17/2020 at 02:31PM

35
#>69 - Lashoun / @lashoun42

11/17/2020 at 02:23PM

36
#>69 - Lashoun / @lashoun42

11/17/2020 at 02:24PM

38
#>73 - Lashoun / @lashoun42

11/17/2020 at 02:21PM

44
#>77 - Lashoun / @lashoun42

11/17/2020 at 02:17PM