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

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

246 active golfers, 1302 entries

Solutions by @SusSquirrel:
16
#30 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:38PM

17
#>70 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:36PM

18
#>87 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:34PM

19
#>93 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:33PM

22
#>105 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:30PM

24
#>117 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:28PM

25
#>121 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:26PM

26
#>125 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:24PM

27
#>132 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:21PM

31
#>157 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:19PM

32
#>172 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:18PM

34
#>181 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:17PM

35
#>187 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:15PM

41
#>210 - Arya Kumar / @SusSquirrel

05/17/2021 at 03:13PM