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):
14
#91 - Alex / @AlexanderHeatl2

08/29/2022 at 04:42PM

14
#92 - Janzen / @__Coos

10/04/2022 at 01:10PM

14
#93 - moh ayaya / @AyayaMoh

09/08/2023 at 07:09PM

14
#94 - Peppa Pig / @PeppaPigSg

05/19/2024 at 07:11AM

14
#95 - Aly Thobani / @alythobani

05/31/2024 at 01:10AM

14
#96 - nickGPT / @nickandbro

08/24/2024 at 03:38PM

15
#97 - Tinko Minko / @tandikula

06/06/2019 at 06:03PM

15
#98 - Saki Gw / @Sakigw

06/07/2019 at 07:07AM

15
#99 - Reportados123 / @reportados123

06/09/2019 at 12:42AM

15
#100 - Mac Goever / @MacGoever

06/12/2019 at 08:34PM

15
#101 - garry quested / @GQuested

07/04/2019 at 08:47AM

15
#102 - Chester Yap / @Chest_ErYap

07/27/2019 at 09:02PM

15
#103 - りんご / @ringo9971

08/06/2019 at 08:29AM

15
#104 - Bradley M. Small / @BradleySmall

08/10/2019 at 03:20AM

15
#105 - Adam Katz / @AdamKat01277576

08/12/2019 at 08:19AM

15
#106 - Marco💾 / @markomannux

08/23/2019 at 09:43PM

15
#107 - Abnermtj / @Abnerjr19

09/13/2019 at 01:39PM

15
#108 - Gregory Furter / @gfurter

10/29/2019 at 02:33PM

15
#109 - Lory / @Lory46845742

10/31/2019 at 03:56PM

15
#110 - Chris Covert / @covertcj

11/07/2019 at 09:25PM

15
#111 - mogitate / @mutemeat

11/16/2019 at 09:58AM

15
#112 - damien / @GreatTestyTest

11/17/2019 at 04:27PM

15
#113 - Jean-Francois Parent / @hacker_pyrat

02/13/2020 at 12:38AM

15
#114 - KingYames / @JamesZeHunter

02/25/2020 at 12:56PM

15
#115 - floyd / @floyd10086

03/09/2020 at 04:26AM

15
#116 - Rodrigo V. Lopes / @rodvlopes

04/07/2020 at 05:05PM

15
#117 - Martin Bielik / @mabielik

09/05/2020 at 04:30PM

15
#118 - Leland Paul Kusmer / @lelandpaul

10/22/2020 at 02:52PM

15
#119 - roudens / @roudens2

12/20/2020 at 04:01PM

15
#120 - pherapont / @pherapont1

01/23/2021 at 04:29AM