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

228 active golfers, 982 entries

Leaderboard (lowest score wins):
14
#61 - Dan Kilman / @dan_kilman

12/19/2019 at 07:05PM

14
#62 - Delon / @delonleonard

12/27/2019 at 11:35AM

14
#63 - Francesco Minnocci / @fminnocci

12/28/2019 at 02:38PM

14
#64 - mowglian / @mowglian

01/11/2020 at 10:08PM

14
#65 - howanto / @ho_wan_

02/21/2020 at 12:46AM

14
#66 - countime / @countime1

03/09/2020 at 05:13AM

14
#67 - Marco / @Marco24456514

03/21/2020 at 10:50PM

14
#68 - Moatvald / @moatvald

04/19/2020 at 07:42PM

14
#69 - Arthur Goodman / @ArthurGoodman3

04/30/2020 at 12:00PM

14
#70 - Kevin Keefe / @KevinKeefe5

06/03/2020 at 05:42PM

14
#71 - Valdimar / @genkobar

06/06/2020 at 09:14AM

14
#72 - RockerZZY / @rocker_zzy

06/08/2020 at 12:12AM

14
#73 - Robberechts Arne / @ArneRobberechts

06/15/2020 at 01:54PM

14
#74 - Blake Tereau / @BlakeTereau

09/11/2020 at 03:37AM

14
#75 - speisz / @speiszc

09/12/2020 at 09:32PM

14
#76 - grubeb / @grubeb4

09/30/2020 at 11:50PM

14
#77 - Ivan Kwong / @IvanKwong5

10/08/2020 at 04:07PM

14
#78 - lamtt77 / @lamtt77

10/10/2020 at 11:51AM

14
#79 - chocolate / @chocola81394123

11/29/2020 at 11:19AM

15
#80 - Tinko Minko / @tandikula

06/06/2019 at 06:03PM

15
#81 - Saki Gw / @Sakigw

06/07/2019 at 07:07AM

15
#82 - Reportados123 / @reportados123

06/09/2019 at 12:42AM

15
#83 - Mac Goever / @MacGoever

06/12/2019 at 08:34PM

15
#84 - garry quested / @GQuested

07/04/2019 at 08:47AM

15
#85 - Chester Yap / @Chest_ErYap

07/27/2019 at 09:02PM

15
#86 - りんご / @ringo9971

08/06/2019 at 08:29AM

15
#87 - Bradley M. Small / @BradleySmall

08/10/2019 at 03:20AM

15
#88 - Adam Katz / @AdamKat01277576

08/12/2019 at 08:19AM

15
#89 - Marco Mannucci / @markomannux

08/23/2019 at 09:43PM

15
#90 - Abner jr / @Abnerjr19

09/13/2019 at 01:39PM