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):
30
#241 - dtjong / @dtjong2

06/07/2019 at 05:26AM

30
#242 - valeryan deux / @DeuxValeryan

06/07/2019 at 12:17PM

30
#243 - duyanh.y4n.pham / @PhamY4n

06/10/2019 at 05:15PM

30
#244 - Chris G / @AboutThatThing

06/12/2019 at 08:54AM

30
#245 - Phoon / @justflashhim

07/30/2019 at 12:32AM

30
#246 - Ivo Blöchliger / @aigledesalpes

08/02/2019 at 03:13PM

31
#247 - Tony Buranzon / @therealTbunz

01/06/2021 at 04:26PM

31
#248 - Pranjul Tripathi / @h0Imes221B

05/11/2021 at 09:54AM

32
#249 - excalipoor / @pawlrus

06/07/2019 at 09:49AM

32
#250 - Mike Clark / @mikeclark729

06/11/2019 at 02:25PM

32
#251 - Emil Braserud / @Erdustiggen

06/24/2019 at 01:20PM

32
#252 - Ralph Callaway / @RalphAtCCC

09/09/2019 at 11:37PM

33
#253 - grantopher orange / @grantopher

07/22/2019 at 11:40PM

34
#254 - David Nash / @david_nash

06/06/2019 at 11:03PM

34
#255 - shivam singh / @shivams52105002

05/05/2021 at 10:14AM

37
#256 - Константин / @pillar_vandyke

10/31/2019 at 07:51PM

37
#257 - rats is a cool name / @cd_rum

12/22/2020 at 07:59AM

43
#258 - fff / @fff51460170

02/20/2021 at 03:23PM

48
#259 - Thomas Jung / @ThomasAJung

01/21/2020 at 04:31PM

67
#260 - Larry Adames / @LarryAdames

07/02/2019 at 09:34PM

73
#261 - Elias Dräxler / @DraxlerElias

03/04/2020 at 08:18AM

79
#262 - Jessica Kraft / @JessicaKraft19

06/26/2019 at 02:03AM

85
#263 - Lewis Marshall / @LewisAMarshall

06/16/2019 at 06:28PM

92
#264 - deedeemeen / @deedeemeen

06/09/2019 at 03:56AM

137
#265 - Zestv / @fuesii

03/04/2020 at 08:10AM