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):
15
#91 - Gregory Furter / @gfurter

10/29/2019 at 02:33PM

15
#92 - Lory / @Lory46845742

10/31/2019 at 03:56PM

15
#93 - Chris Covert / @covertcj

11/07/2019 at 09:25PM

15
#94 - mogitate / @mutemeat

11/16/2019 at 09:58AM

15
#95 - damien / @GreatTestyTest

11/17/2019 at 04:27PM

15
#96 - Jean-Francois Parent / @hacker_pyrat

02/13/2020 at 12:38AM

15
#97 - KingYames / @JamesZeHunter

02/25/2020 at 12:56PM

15
#98 - floyd / @floyd10086

03/09/2020 at 04:26AM

15
#99 - Rodrigo V. Lopes / @rodvlopes

04/07/2020 at 05:05PM

15
#100 - Martin Bielik / @mabielik

09/05/2020 at 04:30PM

15
#101 - Leland Paul Kusmer / @lelandpaul

10/22/2020 at 02:52PM

16
#102 - Baine Wedlock / @BaineWedlock

09/12/2019 at 08:39AM

16
#103 - せいほう / @FICSQF

05/21/2020 at 03:50AM

16
#104 - Tanzeel Kazi / @tanzeelkazi

08/25/2020 at 04:36AM

17
#105 - deurzen / @devrzen

06/06/2019 at 10:14AM

17
#106 - golf_throwaway / @GolfThrowaway

06/06/2019 at 12:27PM

17
#107 - Tim Dean / @Tmdean

06/06/2019 at 05:32PM

17
#108 - Zevurari / @zevurari

06/06/2019 at 08:18PM

17
#109 - Karl Rombauts / @KarlRombauts

06/07/2019 at 05:03AM

17
#110 - Clint Caudle / @ClintCaudle

07/25/2019 at 01:15AM

17
#111 - Sean Dewar / @seandewar

03/13/2020 at 07:37PM

17
#112 - Nathan Hartman / @hnathan918

04/03/2020 at 03:54PM

17
#113 - volandkit / @volandkit

04/20/2020 at 10:24PM

17
#114 - soundscope / @__soundscope__

06/30/2020 at 05:46AM

18
#115 - Ola / @Ola73745831

07/05/2019 at 09:51AM

18
#116 - Nick Yeow / @nickyeow

07/18/2019 at 04:39PM

18
#117 - Jonathan Browning / @yungjig90

07/30/2019 at 08:57PM

18
#118 - ciela / @lededex

08/28/2019 at 07:36PM

18
#119 - shota_ogswr / @shota_ogasawara

11/26/2019 at 03:20PM

18
#120 - Lion de Bell / @CLGBamboo

12/01/2019 at 08:26PM