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

238 active golfers, 1037 entries

Leaderboard (lowest score wins):
23
#181 - Joseph A Shalabi / @JosephShalabi

06/27/2019 at 12:45AM

23
#182 - aurelian ardeleanu / @inquarto

07/11/2019 at 07:48AM

23
#183 - Crystal L / @Cartsly

07/13/2019 at 08:06PM

23
#184 - Ariel Miculas / @ArielMiculas

09/18/2019 at 11:24PM

23
#185 - Jonathan Medwig / @jmedwig

10/28/2019 at 01:18PM

23
#186 - vicver09 / @vicver091

10/28/2019 at 04:52PM

23
#187 - Jason Neylon / @jasonneylon

12/23/2019 at 06:34PM

23
#188 - The Valencian Dev / @thevalenciandev

10/12/2020 at 06:05PM

24
#189 - Clarence Cheong / @IBrightStudioI

06/08/2019 at 06:24AM

24
#190 - Kyle X. Clark / @KyXr_Clark

02/15/2020 at 03:59PM

24
#191 - Sergio / @SergioVl12

08/07/2020 at 06:41AM

25
#192 - Will Durney / @WillDurney

06/06/2019 at 08:28PM

25
#193 - Mauricio Ariza / @_hell_spawn

06/11/2019 at 02:19PM

25
#194 - Laurent Atlan / @laurentatlan1

06/24/2019 at 04:47PM

25
#195 - vim_ninja / @NinjaVim

08/25/2019 at 11:30PM

25
#196 - JL T / @l0f4r0

07/22/2020 at 09:07PM

26
#197 - overlookedhashmap / @overlookedhash1

06/07/2019 at 10:33PM

26
#198 - Hans-Wilhelm / @hanswilw

06/21/2019 at 01:04PM

26
#199 - Steve Racanovic / @steve_racanovic

01/15/2020 at 05:37AM

26
#200 - drGsus / @drGsus

07/25/2020 at 05:29PM

27
#201 - Matthew Krafczyk / @int_matt

06/06/2019 at 09:45PM

27
#202 - Josh Braun / @bbraunj

06/29/2019 at 03:25PM

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

07/06/2019 at 05:43PM

27
#204 - James Raubenheimer / @jamzrob

07/18/2019 at 11:25PM

27
#205 - Martin Huter / @marhat87

03/04/2020 at 02:49PM

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

06/08/2019 at 11:59AM

28
#207 - Jess / @Jess74311450

06/11/2019 at 01:14PM

28
#208 - Paul Yates / @PYates77

06/17/2019 at 06:58PM

28
#209 - Floyd Gantt / @fgantt

06/27/2019 at 06:31PM

28
#210 - Test Name / @TestNam40177593

07/28/2019 at 11:49AM