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

246 active golfers, 1071 entries

Leaderboard (lowest score wins):
22
#181 - sundeep routhu / @sundeep12005

08/31/2019 at 09:15AM

23
#182 - deHman89 / @danho89

06/07/2019 at 07:10AM

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

06/07/2019 at 07:06PM

23
#184 - Grzegorz Andrzejowski / @AndrzejowskiG

06/17/2019 at 01:59PM

23
#185 - Joseph A Shalabi / @JosephShalabi

06/27/2019 at 12:45AM

23
#186 - aurelian ardeleanu / @inquarto

07/11/2019 at 07:48AM

23
#187 - Crystal L / @Cartsly

07/13/2019 at 08:06PM

23
#188 - Ariel Miculas / @ArielMiculas

09/18/2019 at 11:24PM

23
#189 - Jonathan Medwig / @jmedwig

10/28/2019 at 01:18PM

23
#190 - vicver09 / @vicver091

10/28/2019 at 04:52PM

23
#191 - Jason Neylon / @jasonneylon

12/23/2019 at 06:34PM

23
#192 - The Valencian Dev / @thevalenciandev

10/12/2020 at 06:05PM

24
#193 - Clarence Cheong / @IBrightStudioI

06/08/2019 at 06:24AM

24
#194 - Kyle X. Clark / @KyXr_Clark

02/15/2020 at 03:59PM

24
#195 - Sergio / @SergioVl12

08/07/2020 at 06:41AM

25
#196 - Will Durney / @WillDurney

06/06/2019 at 08:28PM

25
#197 - Mauricio Ariza / @_hell_spawn

06/11/2019 at 02:19PM

25
#198 - Laurent Atlan / @laurentatlan1

06/24/2019 at 04:47PM

25
#199 - vim_ninja / @NinjaVim

08/25/2019 at 11:30PM

25
#200 - JL T / @l0f4r0

07/22/2020 at 09:07PM

26
#201 - overlookedhashmap / @overlookedhash1

06/07/2019 at 10:33PM

26
#202 - Hans-Wilhelm / @hanswilw

06/21/2019 at 01:04PM

26
#203 - Steve Racanovic / @steve_racanovic

01/15/2020 at 05:37AM

26
#204 - drGsus / @drGsus

07/25/2020 at 05:29PM

27
#205 - Matthew Krafczyk / @int_matt

06/06/2019 at 09:45PM

27
#206 - Josh Braun / @bbraunj

06/29/2019 at 03:25PM

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

07/06/2019 at 05:43PM

27
#208 - James Raubenheimer / @jamzrob

07/18/2019 at 11:25PM

27
#209 - Martin Huter / @marhat87

03/04/2020 at 02:49PM

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

06/08/2019 at 11:59AM