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 @ikmijkk7:

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

332 active golfers, 1808 entries

Solutions by @ikmijkk7:
16
#40 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 05:18PM

17
#>92 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 05:01PM

18
#>114 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 05:00PM

19
#>119 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:57PM

20
#>121 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:56PM

21
#>128 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:54PM

22
#>138 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 08:01AM

23
#>150 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 08:00AM

24
#>156 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:59AM

25
#>161 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:58AM

26
#>170 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:56AM

27
#>184 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:52AM

30
#>211 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:44AM

31
#>214 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:40AM

32
#>233 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:43AM

36
#>259 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:51PM

39
#>272 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:35AM

40
#>281 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:42PM

42
#>288 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:31AM

57
#>311 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:37PM

68
#>321 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:26AM

80
#>326 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:40PM

126
#>332 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:48PM

129
#>332 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:32PM

141
#>332 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:24AM