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

334 active golfers, 1812 entries

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

12/02/2020 at 03:46PM

17
#>71 - f a / @5eraf

12/02/2020 at 03:14PM

17
#>71 - f a / @5eraf

12/02/2020 at 03:30PM

18
#>109 - f a / @5eraf

12/02/2020 at 06:02AM

18
#>109 - f a / @5eraf

12/02/2020 at 06:29AM

19
#>116 - f a / @5eraf

12/02/2020 at 02:39AM

19
#>116 - f a / @5eraf

12/02/2020 at 06:30AM

21
#>126 - f a / @5eraf

12/02/2020 at 02:41AM

22
#>131 - f a / @5eraf

12/02/2020 at 01:18AM

22
#>131 - f a / @5eraf

12/02/2020 at 02:00AM

22
#>131 - f a / @5eraf

12/02/2020 at 02:36AM

23
#>148 - f a / @5eraf

12/02/2020 at 01:26AM

23
#>148 - f a / @5eraf

12/02/2020 at 01:29AM

23
#>148 - f a / @5eraf

12/02/2020 at 01:31AM

23
#>148 - f a / @5eraf

12/02/2020 at 01:32AM

24
#>152 - f a / @5eraf

12/02/2020 at 01:02AM

25
#>158 - f a / @5eraf

11/30/2020 at 04:43PM

25
#>158 - f a / @5eraf

12/01/2020 at 05:53AM

26
#>166 - f a / @5eraf

11/30/2020 at 10:08AM

26
#>166 - f a / @5eraf

12/01/2020 at 05:40AM

26
#>166 - f a / @5eraf

12/01/2020 at 05:42AM

27
#>177 - f a / @5eraf

12/01/2020 at 05:37AM

28
#>188 - f a / @5eraf

11/30/2020 at 08:52AM

28
#>188 - f a / @5eraf

12/01/2020 at 05:23AM

29
#>194 - f a / @5eraf

11/30/2020 at 09:12AM

30
#>198 - f a / @5eraf

11/30/2020 at 09:09AM

31
#>213 - f a / @5eraf

11/30/2020 at 08:32AM

32
#>221 - f a / @5eraf

11/30/2020 at 08:13AM

33
#>237 - f a / @5eraf

11/30/2020 at 08:08AM

35
#>253 - f a / @5eraf

11/30/2020 at 08:03AM

40
#>274 - f a / @5eraf

11/30/2020 at 08:10AM