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

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

373 active golfers, 2022 entries

Solutions by @tada_kun8:
26
#198 - でよ / @tada_kun8

01/27/2023 at 03:47AM

27
#>209 - でよ / @tada_kun8

01/27/2023 at 03:45AM

28
#>217 - でよ / @tada_kun8

01/27/2023 at 03:43AM

29
#>219 - でよ / @tada_kun8

01/27/2023 at 03:42AM

30
#>237 - でよ / @tada_kun8

01/27/2023 at 03:37AM

31
#>243 - でよ / @tada_kun8

01/27/2023 at 03:35AM

32
#>264 - でよ / @tada_kun8

01/27/2023 at 03:30AM

34
#>283 - でよ / @tada_kun8

01/27/2023 at 03:28AM

35
#>289 - でよ / @tada_kun8

01/27/2023 at 03:26AM

36
#>292 - でよ / @tada_kun8

01/27/2023 at 03:25AM

45
#>329 - でよ / @tada_kun8

01/27/2023 at 03:18AM

47
#>336 - でよ / @tada_kun8

01/27/2023 at 03:16AM

49
#>338 - でよ / @tada_kun8

01/27/2023 at 02:41AM

98
#>369 - でよ / @tada_kun8

01/27/2023 at 02:40AM

114
#>371 - でよ / @tada_kun8

01/27/2023 at 02:38AM