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 @5eraf:

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

172 active golfers, 910 entries

Solutions by @5eraf:
16
#7 - f a / @5eraf

12/02/2020 at 03:46PM

17
#>40 - f a / @5eraf

12/02/2020 at 03:14PM

17
#>40 - f a / @5eraf

12/02/2020 at 03:30PM

18
#>63 - f a / @5eraf

12/02/2020 at 06:02AM

18
#>63 - f a / @5eraf

12/02/2020 at 06:29AM

19
#>63 - f a / @5eraf

12/02/2020 at 02:39AM

19
#>63 - f a / @5eraf

12/02/2020 at 06:30AM

21
#>70 - f a / @5eraf

12/02/2020 at 02:41AM

22
#>72 - f a / @5eraf

12/02/2020 at 01:18AM

22
#>72 - f a / @5eraf

12/02/2020 at 02:00AM

22
#>72 - f a / @5eraf

12/02/2020 at 02:36AM

23
#>82 - f a / @5eraf

12/02/2020 at 01:26AM

23
#>82 - f a / @5eraf

12/02/2020 at 01:29AM

23
#>82 - f a / @5eraf

12/02/2020 at 01:31AM

23
#>82 - f a / @5eraf

12/02/2020 at 01:32AM

24
#>83 - f a / @5eraf

12/02/2020 at 01:02AM

25
#>86 - f a / @5eraf

11/30/2020 at 04:43PM

25
#>86 - f a / @5eraf

12/01/2020 at 05:53AM

26
#>90 - f a / @5eraf

11/30/2020 at 10:08AM

26
#>90 - f a / @5eraf

12/01/2020 at 05:40AM

26
#>90 - f a / @5eraf

12/01/2020 at 05:42AM

27
#>91 - f a / @5eraf

12/01/2020 at 05:37AM

28
#>95 - f a / @5eraf

11/30/2020 at 08:52AM

28
#>95 - f a / @5eraf

12/01/2020 at 05:23AM

29
#>98 - f a / @5eraf

11/30/2020 at 09:12AM

30
#>102 - f a / @5eraf

11/30/2020 at 09:09AM

31
#>111 - f a / @5eraf

11/30/2020 at 08:32AM

32
#>118 - f a / @5eraf

11/30/2020 at 08:13AM

33
#>126 - f a / @5eraf

11/30/2020 at 08:08AM

35
#>132 - f a / @5eraf

11/30/2020 at 08:03AM

40
#>144 - f a / @5eraf

11/30/2020 at 08:10AM