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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 251 remaining solutions by signing in and submitting your own entry
#252 Zestv / @fuesii - Score: 137 - 03/04/20 @ 08:10
<Down><Down><Down><Down><Down><Down><Down><Down>ov<BS><Esc>v<Up><Up><Up><Up>d<Up><Up><Up><Up><Up>p<Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Left>v<Down><Down><Down><Right>d<Up><Up><Up><Up><Up><Up><Up><Up><Up>p<Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down>v<Down><Down><Down><Right>d<Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up>p<Down><Down><Down><Down>i#<Right><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><BS><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><BS><Esc>:x<CR>

0 comments


Created by: @valacar

252 active golfers, 1112 entries

Leaderboard (lowest score wins):
34
#241 - David Nash / @david_nash

06/06/2019 at 11:03PM

34
#242 - shivam singh / @shivams52105002

05/05/2021 at 10:14AM

37
#243 - Константин / @pillar_vandyke

10/31/2019 at 07:51PM

37
#244 - rats is a cool name / @cd_rum

12/22/2020 at 07:59AM

43
#245 - fff / @fff51460170

02/20/2021 at 03:23PM

48
#246 - Thomas Jung / @ThomasAJung

01/21/2020 at 04:31PM

67
#247 - Larry Adames / @LarryAdames

07/02/2019 at 09:34PM

73
#248 - Elias Dräxler / @DraxlerElias

03/04/2020 at 08:18AM

79
#249 - Jessica Kraft / @JessicaKraft19

06/26/2019 at 02:03AM

85
#250 - Lewis Marshall / @LewisAMarshall

06/16/2019 at 06:28PM

92
#251 - deedeemeen / @deedeemeen

06/09/2019 at 03:56AM

137
#252 - Zestv / @fuesii

03/04/2020 at 08:10AM