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):
30
#211 - duyanh.y4n.pham / @PhamY4n

06/10/2019 at 05:15PM

30
#212 - Chris G / @AboutThatThing

06/12/2019 at 08:54AM

30
#213 - Phoon / @justflashhim

07/30/2019 at 12:32AM

30
#214 - Ivo Blöchliger / @aigledesalpes

08/02/2019 at 03:13PM

32
#215 - pommevilla / @pawlrus

06/07/2019 at 09:49AM

32
#216 - Mike Clark / @mikeclark729

06/11/2019 at 02:25PM

32
#217 - Emil Braserud / @Erdustiggen

06/24/2019 at 01:20PM

32
#218 - Ralph Callaway / @RalphAtCCC

09/09/2019 at 11:37PM

33
#219 - grantopher orange / @grantopher

07/22/2019 at 11:40PM

34
#220 - David Nash / @david_nash

06/06/2019 at 11:03PM

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

10/31/2019 at 07:51PM

48
#222 - Thomas Jung / @ThomasAJung

01/21/2020 at 04:31PM

67
#223 - Larry Adames / @LarryAdames

07/02/2019 at 09:34PM

73
#224 - Elias Dräxler / @DraxlerElias

03/04/2020 at 08:18AM

79
#225 - Jessica Kraft / @JessicaKraft19

06/26/2019 at 02:03AM

85
#226 - Lewis Marshall / @LewisAMarshall

06/16/2019 at 06:28PM

92
#227 - deedeemeen / @deedeemeen

06/09/2019 at 03:56AM

137
#228 - Zestv / @fuesii

03/04/2020 at 08:10AM