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

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

394 active golfers, 2173 entries

Solutions by @xx19971016:
16
#55 - 李建宏 / @xx19971016

08/31/2023 at 08:19AM

17
#>114 - 李建宏 / @xx19971016

08/31/2023 at 08:17AM

18
#>137 - 李建宏 / @xx19971016

08/31/2023 at 08:16AM

19
#>142 - 李建宏 / @xx19971016

08/31/2023 at 08:14AM

20
#>148 - 李建宏 / @xx19971016

08/31/2023 at 08:11AM

21
#>155 - 李建宏 / @xx19971016

08/31/2023 at 08:10AM

22
#>169 - 李建宏 / @xx19971016

08/31/2023 at 08:08AM

23
#>180 - 李建宏 / @xx19971016

08/31/2023 at 08:07AM

24
#>188 - 李建宏 / @xx19971016

08/31/2023 at 08:06AM

25
#>195 - 李建宏 / @xx19971016

08/31/2023 at 08:04AM

26
#>209 - 李建宏 / @xx19971016

08/31/2023 at 08:01AM

27
#>222 - 李建宏 / @xx19971016

08/31/2023 at 07:59AM

28
#>228 - 李建宏 / @xx19971016

08/31/2023 at 07:58AM

30
#>250 - 李建宏 / @xx19971016

08/31/2023 at 07:52AM

32
#>279 - 李建宏 / @xx19971016

08/31/2023 at 07:47AM

34
#>296 - 李建宏 / @xx19971016

08/31/2023 at 07:46AM

36
#>305 - 李建宏 / @xx19971016

08/31/2023 at 07:44AM