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

265 active golfers, 1182 entries

Leaderboard (lowest score wins):
21
#181 - Raphael / @Console64

06/10/2019 at 03:37PM

21
#182 - Prashanth / @Prashanth157T

06/12/2019 at 04:12AM

21
#183 - Paul Inc / @hiniol1982

06/23/2019 at 08:20AM

21
#184 - Aurel / @AurelienFebvre

06/23/2019 at 08:06PM

21
#185 - Καράτε Μόνο / @karate_mono

06/24/2019 at 12:38PM

21
#186 - Egor Fedkin / @Jet_Flynn

06/25/2019 at 07:35AM

21
#187 - Karan Gajwani / @karangb

07/12/2019 at 10:23PM

21
#188 - Ben Allan / @hellobenallan

08/19/2019 at 01:56PM

21
#189 - kevinski / @kevinsk30746831

08/22/2019 at 03:46PM

21
#190 - Aioriya / @AioriyaDonk

08/26/2019 at 12:57AM

21
#191 - Andrei Popescu / @AndreiTheory

12/09/2019 at 09:53PM

21
#192 - Yannick / @Yannick88147038

09/20/2020 at 06:49PM

22
#193 - Erik Lindeborg / @ErikLindeborg

06/07/2019 at 02:42PM

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

06/11/2019 at 01:06PM

22
#195 - couaber / @couaber

06/23/2019 at 07:13PM

22
#196 - Vim Golfer / @VimGolfer6

07/07/2019 at 10:45AM

22
#197 - dahara / @kuma_moooon

08/15/2019 at 03:05PM

22
#198 - sundeep routhu / @sundeep12005

08/31/2019 at 09:15AM

22
#199 - James / @Dronak

12/02/2022 at 04:14PM

23
#200 - deHman89 / @danho89

06/07/2019 at 07:10AM

23
#201 - Dr Rev J. “I am not a bot!” Kirchartz, KSC, KHS / @JKirchartz

06/07/2019 at 07:06PM

23
#202 - Grzegorz Andrzejowski / @AndrzejowskiG

06/17/2019 at 01:59PM

23
#203 - Joseph A Shalabi / @JosephShalabi

06/27/2019 at 12:45AM

23
#204 - aurelian ardeleanu / @inquarto

07/11/2019 at 07:48AM

23
#205 - Crystal L / @Cartsly

07/13/2019 at 08:06PM

23
#206 - Ariel Miculas / @ArielMiculas

09/18/2019 at 11:24PM

23
#207 - Jonathan Medwig / @jmedwig

10/28/2019 at 01:18PM

23
#208 - vicver09 / @vicver091

10/28/2019 at 04:52PM

23
#209 - Jason Neylon / @jasonneylon

12/23/2019 at 06:34PM

23
#210 - The Valencian Dev / @thevalenciandev

10/12/2020 at 06:05PM