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 5cf8aa1281437e000c4df724

Reorder the groups

Change the order so that the groups of fruit come before the vegetables.

Start file
# vegetable
broccoli
spinach
carrot
-
# fruit
peach
plum
-
# vegetable
potato
-
# fruit
apple
banana
-
# vegetable
onion
-
# fruit
watermelon
cherry
-
End file
# fruit
peach
plum
-
# fruit
apple
banana
-
# fruit
watermelon
cherry
-
# vegetable
broccoli
spinach
carrot
-
# vegetable
potato
-
# vegetable
onion
-

View Diff

1,5d0
< # vegetable
< broccoli
< spinach
< carrot
< -
10,12d4
< # vegetable
< potato
< -
17,19d8
< # vegetable
< onion
< -
22a12,22
> -
> # vegetable
> broccoli
> spinach
> carrot
> -
> # vegetable
> potato
> -
> # vegetable
> onion

Solutions by @GavinKoeng:

Unlock 10 remaining solutions by signing in and submitting your own entry
Created by: @valacar

267 active golfers, 1195 entries

Solutions by @GavinKoeng:
14
#97 - Gavin / @GavinKoeng

02/07/2026 at 05:22PM

15
#>127 - Gavin / @GavinKoeng

02/07/2026 at 05:22PM

16
#>131 - Gavin / @GavinKoeng

02/07/2026 at 05:21PM

16
#>131 - Gavin / @GavinKoeng

02/07/2026 at 05:21PM

17
#>143 - Gavin / @GavinKoeng

02/07/2026 at 05:19PM

18
#>156 - Gavin / @GavinKoeng

02/07/2026 at 05:18PM

19
#>166 - Gavin / @GavinKoeng

02/07/2026 at 05:18PM

20
#>179 - Gavin / @GavinKoeng

02/07/2026 at 05:18PM

23
#>213 - Gavin / @GavinKoeng

02/07/2026 at 05:17PM

24
#>216 - Gavin / @GavinKoeng

02/07/2026 at 05:15PM