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 263 remaining solutions by signing in and submitting your own entry
#264 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

264 active golfers, 1181 entries

Leaderboard (lowest score wins):
14
#1 - Joo Ming / @JooMingJoo

06/06/2019 at 02:37PM

14
#2 - Smylers / @Smylers2

06/06/2019 at 05:13PM

14
#3 - Ben M / @Sweet_Scientist

06/06/2019 at 10:07PM

14
#4 - Thomas Vigouroux / @ThomasVigourou4

06/06/2019 at 10:24PM

14
#5 - Sæther / @baltre1

06/06/2019 at 10:57PM

14
#6 - Jon Krause / @jkrause314

06/07/2019 at 05:21AM

14
#7 - René Hansen / @rhardih

06/07/2019 at 09:25AM

14
#8 - John Braxler / @braxler

06/07/2019 at 12:56PM

14
#9 - Evans Code Rants / @EvansCodeRants

06/07/2019 at 03:40PM

14
#10 - i_orykhivskyi / @i_orykh

06/08/2019 at 06:47PM

14
#11 - james_bunch / @james_bunch

06/08/2019 at 09:09PM

14
#12 - Valacar / @valacar

06/09/2019 at 11:20PM

14
#13 - summingbest / @summingbest

06/10/2019 at 03:01AM

14
#14 - heppen / @heppen_He

06/10/2019 at 02:08PM

14
#15 - Koba / @lkoba

06/11/2019 at 09:14PM

14
#16 - Hans Aschenloher / @aschenloher

06/12/2019 at 01:32PM

14
#17 - zealotrush / @zealotrush

06/14/2019 at 05:29AM

14
#18 - will / @willpnw

06/15/2019 at 07:13PM

14
#19 - Gabriel Barta / @gbarta

06/18/2019 at 06:06AM

14
#20 - d / @dnadeau13

06/22/2019 at 03:04AM

14
#21 - hielke / @hielke24840788

06/22/2019 at 05:45PM

14
#22 - hodenkobold66 / @hodenkobold66

06/23/2019 at 11:07AM

14
#23 - Nathan Knox / @the_nathan_knox

06/26/2019 at 03:26PM

14
#24 - Miłosz Łakomy / @foobar01123

06/28/2019 at 10:21AM

14
#25 - Epecb / @BceEpecb

06/28/2019 at 09:37PM

14
#26 - majo senf / @majo_senf

07/01/2019 at 07:43AM

14
#27 - lofoneax / @lofoneax

07/02/2019 at 01:24PM

14
#28 - Filipe Brandenburger / @filbranden

07/08/2019 at 01:52AM

14
#29 - Petru-Armand Bancila / @petruarmand

07/08/2019 at 10:58PM

14
#30 - Neil Struthers / @struthersneil

07/16/2019 at 08:15PM