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

217 active golfers, 935 entries

Leaderboard (lowest score wins):
21
#151 - José / @AngelGaldamez

08/26/2019 at 12:57AM

21
#152 - Andrei Popescu / @AndreiTheory

12/09/2019 at 09:53PM

22
#153 - Erik Lindeborg / @ErikLindeborg

06/07/2019 at 02:42PM

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

06/11/2019 at 01:06PM

22
#155 - couaber / @couaber

06/23/2019 at 07:13PM

22
#156 - Vim Golfer / @VimGolfer6

07/07/2019 at 10:45AM

22
#157 - dahara / @kuma_moooon

08/15/2019 at 03:05PM

22
#158 - sundeep routhu / @sundeep12005

08/31/2019 at 09:15AM

23
#159 - deHman89 / @danho89

06/07/2019 at 07:10AM

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

06/07/2019 at 07:06PM

23
#161 - Grzegorz Andrzejowski / @AndrzejowskiG

06/17/2019 at 01:59PM

23
#162 - Joseph A Shalabi / @JosephShalabi

06/27/2019 at 12:45AM

23
#163 - aurelian ardeleanu / @inquarto

07/11/2019 at 07:48AM

23
#164 - Crystal L / @Cartsly

07/13/2019 at 08:06PM

23
#165 - Ariel Miculas / @ArielMiculas

09/18/2019 at 11:24PM

23
#166 - Jonathan Medwig / @jmedwig

10/28/2019 at 01:18PM

23
#167 - vicver09 / @vicver091

10/28/2019 at 04:52PM

23
#168 - Jason Neylon / @jasonneylon

12/23/2019 at 06:34PM

24
#169 - Clarence Cheong / @IBrightStudioI

06/08/2019 at 06:24AM

24
#170 - Kyle X. Clark / @KyXr_Clark

02/15/2020 at 03:59PM

24
#171 - Yannick / @Yannick88147038

06/07/2020 at 04:33PM

24
#172 - Sergio / @SergioVl12

08/07/2020 at 06:41AM

25
#173 - Will Durney / @WillDurney

06/06/2019 at 08:28PM

25
#174 - Mauricio Ariza / @_hell_spawn

06/11/2019 at 02:19PM

25
#175 - Laurent Atlan / @laurentatlan1

06/24/2019 at 04:47PM

25
#176 - vim_ninja / @NinjaVim

08/25/2019 at 11:30PM

25
#177 - JL T / @l0f4r0

07/22/2020 at 09:07PM

26
#178 - overlookedhashmap / @overlookedhash1

06/07/2019 at 10:33PM

26
#179 - Hans-Wilhelm / @hanswilw

06/21/2019 at 01:04PM

26
#180 - Steve Racanovic / @steve_racanovic

01/15/2020 at 05:37AM