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

367 active golfers, 1986 entries

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

05/24/2022 at 05:18PM

17
#>95 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 05:01PM

18
#>126 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 05:00PM

19
#>132 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:57PM

20
#>135 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:56PM

21
#>142 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:54PM

22
#>153 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 08:01AM

23
#>167 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 08:00AM

24
#>175 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:59AM

25
#>180 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:58AM

26
#>189 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:56AM

27
#>204 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:52AM

30
#>233 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:44AM

31
#>240 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:40AM

32
#>259 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:43AM

36
#>288 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:51PM

39
#>303 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:35AM

40
#>312 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:42PM

42
#>320 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:31AM

57
#>346 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:37PM

68
#>356 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:26AM

80
#>361 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:40PM

126
#>367 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:48PM

129
#>367 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 04:32PM

141
#>367 - Xiaohuan Ye / @ikmijkk7

05/24/2022 at 07:24AM