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 97 remaining solutions by signing in and submitting your own entry
#98 deedeemeen / @deedeemeen - Score: 92 - 06/09/19 @ 03:56
13GVjjjdggpuOjk<BS><BS><Esc>pkddjjjjjjjjjVjjdggPjjjjjjjjjjjddkkkkkkkkkpjjjjjjjjjjjjjjjjVGdggjjjjjjjpZZ

0 comments


Created by: @valacar

98 active golfers, 344 entries

Leaderboard (lowest score wins):
21
#61 - Egor Fedkin / @Jet_Flynn

06/25/2019 at 07:35AM

21
#62 - Karan Gajwani / @karangb

07/12/2019 at 10:23PM

22
#63 - Erik Lindeborg / @ErikLindeborg

06/07/2019 at 02:42PM

22
#64 - Just...That / @I_am_JustThat

06/11/2019 at 01:06PM

22
#65 - couaber / @couaber

06/23/2019 at 07:13PM

22
#66 - Vim Golfer / @VimGolfer6

07/07/2019 at 10:45AM

23
#67 - deHman89 / @danho89

06/07/2019 at 07:10AM

23
#68 - Dr. Rev. J. "Paranoid Android" Kirchartz / @JKirchartz

06/07/2019 at 07:06PM

23
#69 - Grzegorz Andrzejowski / @AndrzejowskiG

06/17/2019 at 01:59PM

23
#70 - Joseph A Shalabi / @JosephShalabi

06/27/2019 at 12:45AM

23
#71 - aurelian ardeleanu / @inquarto

07/11/2019 at 07:48AM

23
#72 - Crystal L / @Cartsly

07/13/2019 at 08:06PM

24
#73 - Clarence Cheong / @IBrightStudioI

06/08/2019 at 06:24AM

25
#74 - Will Durney / @WillDurney

06/06/2019 at 08:28PM

25
#75 - Mauricio Ariza / @_hell_spawn

06/11/2019 at 02:19PM

25
#76 - Laurent Atlan / @laurentatlan1

06/24/2019 at 04:47PM

26
#77 - overlookedhashmap / @overlookedhash1

06/07/2019 at 10:33PM

26
#78 - Hans-Wilhelm / @hanswilw

06/21/2019 at 01:04PM

27
#79 - Matthew Krafczyk / @int_matt

06/06/2019 at 09:45PM

27
#80 - Josh Braun / @bbraunj

06/29/2019 at 03:25PM

27
#81 - Березницкий Вадим / @vad1mster

07/06/2019 at 05:43PM

28
#82 - *9vkZ{YP_XV[XCbNdmnT / @9vkzX

06/08/2019 at 11:59AM

28
#83 - Jess / @Jess74311450

06/11/2019 at 01:14PM

28
#84 - Paul Yates / @PYates77

06/17/2019 at 06:58PM

28
#85 - Floyd Gantt / @fgantt

06/27/2019 at 06:31PM

29
#86 - Adam Wilson / @adamlemurwilson

06/24/2019 at 08:10PM

30
#87 - dtjong / @dtjong2

06/07/2019 at 05:26AM

30
#88 - valeryan deux / @DeuxValeryan

06/07/2019 at 12:17PM

30
#89 - duyanh.y4n.pham / @PhamY4n

06/10/2019 at 05:15PM

30
#90 - Chris G / @AboutThatThing

06/12/2019 at 08:54AM