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

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

370 active golfers, 2011 entries

Solutions by @SanDForcE94:
16
#17 - Andac Safa / @SanDForcE94

01/03/2021 at 01:34PM

17
#>84 - Andac Safa / @SanDForcE94

01/03/2021 at 01:32PM

18
#>123 - Andac Safa / @SanDForcE94

01/03/2021 at 01:30PM

19
#>132 - Andac Safa / @SanDForcE94

01/03/2021 at 01:28PM

19
#>132 - Andac Safa / @SanDForcE94

01/03/2021 at 01:29PM

20
#>136 - Andac Safa / @SanDForcE94

01/03/2021 at 01:27PM

21
#>142 - Andac Safa / @SanDForcE94

01/03/2021 at 01:26PM

22
#>150 - Andac Safa / @SanDForcE94

01/03/2021 at 01:22PM

23
#>167 - Andac Safa / @SanDForcE94

01/03/2021 at 12:57PM

23
#>167 - Andac Safa / @SanDForcE94

01/03/2021 at 12:58PM

24
#>174 - Andac Safa / @SanDForcE94

01/03/2021 at 11:21AM

25
#>180 - Andac Safa / @SanDForcE94

01/03/2021 at 11:19AM

26
#>187 - Andac Safa / @SanDForcE94

01/03/2021 at 07:23AM

27
#>201 - Andac Safa / @SanDForcE94

01/03/2021 at 07:21AM

30
#>226 - Andac Safa / @SanDForcE94

01/03/2021 at 07:18AM

34
#>273 - Andac Safa / @SanDForcE94

01/03/2021 at 06:56AM