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 184 remaining solutions by signing in and submitting your own entry
#185 deedeemeen / @deedeemeen - Score: 92 - 06/09/19 @ 03:56
13GVjjjdggpuOjk<BS><BS><Esc>pkddjjjjjjjjjVjjdggPjjjjjjjjjjjddkkkkkkkkkpjjjjjjjjjjjjjjjjVGdggjjjjjjjpZZ

0 comments


Created by: @valacar

185 active golfers, 808 entries

Leaderboard (lowest score wins):
26
#151 - overlookedhashmap / @overlookedhash1

06/07/2019 at 10:33PM

26
#152 - Hans-Wilhelm / @hanswilw

06/21/2019 at 01:04PM

26
#153 - Steve Racanovic / @steve_racanovic

01/15/2020 at 05:37AM

27
#154 - Matthew Krafczyk / @int_matt

06/06/2019 at 09:45PM

27
#155 - Josh Braun / @bbraunj

06/29/2019 at 03:25PM

27
#156 - Березницкий Вадим / @vad1mster

07/06/2019 at 05:43PM

27
#157 - James Raubenheimer / @jamzrob

07/18/2019 at 11:25PM

28
#158 - *9vkZ{YP_XV[XCbNdmnT / @9vkzX

06/08/2019 at 11:59AM

28
#159 - Jess / @Jess74311450

06/11/2019 at 01:14PM

28
#160 - Paul Yates / @PYates77

06/17/2019 at 06:58PM

28
#161 - Floyd Gantt / @fgantt

06/27/2019 at 06:31PM

28
#162 - Test Name / @TestNam40177593

07/28/2019 at 11:49AM

28
#163 - Bob Ren / @bobrenjc93

07/29/2019 at 03:58PM

28
#164 - Aaron / @_Lordofthevoid_

11/23/2019 at 11:35AM

28
#165 - Ian / @IanPartials

12/16/2019 at 05:48AM

29
#166 - Adam Wilson / @adamlemurwilson

06/24/2019 at 08:10PM

29
#167 - trafficone / @trafficone

11/02/2019 at 07:10AM

30
#168 - dtjong / @dtjong2

06/07/2019 at 05:26AM

30
#169 - valeryan deux / @DeuxValeryan

06/07/2019 at 12:17PM

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

06/10/2019 at 05:15PM

30
#171 - Chris G / @AboutThatThing

06/12/2019 at 08:54AM

30
#172 - Phoon / @justflashhim

07/30/2019 at 12:32AM

30
#173 - Ivo Blöchliger / @aigledesalpes

08/02/2019 at 03:13PM

32
#174 - pommevilla / @pawlrus

06/07/2019 at 09:49AM

32
#175 - Mike Clark / @mikeclark729

06/11/2019 at 02:25PM

32
#176 - Emil Braserud / @Erdustiggen

06/24/2019 at 01:20PM

32
#177 - Ralph Callaway / @RalphAtCCC

09/09/2019 at 11:37PM

33
#178 - grantopher orange / @grantopher

07/22/2019 at 11:40PM

34
#179 - David Nash / @david_nash

06/06/2019 at 11:03PM

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

10/31/2019 at 07:51PM