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

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

380 active golfers, 2103 entries

Solutions by @russellzhaomao:
16
#39 - russellzhaomao / @russellzhaomao

05/19/2022 at 12:42AM

17
#>98 - russellzhaomao / @russellzhaomao

05/19/2022 at 12:13AM

18
#>132 - russellzhaomao / @russellzhaomao

05/19/2022 at 12:11AM

19
#>138 - russellzhaomao / @russellzhaomao

05/19/2022 at 12:09AM

20
#>141 - russellzhaomao / @russellzhaomao

05/19/2022 at 12:06AM

21
#>148 - russellzhaomao / @russellzhaomao

05/19/2022 at 12:01AM

22
#>159 - russellzhaomao / @russellzhaomao

05/18/2022 at 11:58PM

23
#>173 - russellzhaomao / @russellzhaomao

05/18/2022 at 11:57PM

24
#>181 - russellzhaomao / @russellzhaomao

05/18/2022 at 11:54PM

25
#>186 - russellzhaomao / @russellzhaomao

05/18/2022 at 10:47PM

26
#>195 - russellzhaomao / @russellzhaomao

05/18/2022 at 01:38PM

30
#>240 - russellzhaomao / @russellzhaomao

05/18/2022 at 01:36PM

32
#>267 - russellzhaomao / @russellzhaomao

05/18/2022 at 01:30PM

34
#>284 - russellzhaomao / @russellzhaomao

05/18/2022 at 01:26PM

36
#>297 - russellzhaomao / @russellzhaomao

05/18/2022 at 11:36AM

38
#>309 - russellzhaomao / @russellzhaomao

05/18/2022 at 11:25AM

54
#>355 - russellzhaomao / @russellzhaomao

05/18/2022 at 11:21AM