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

246 active golfers, 1071 entries

Leaderboard (lowest score wins):
28
#211 - Jess / @Jess74311450

06/11/2019 at 01:14PM

28
#212 - Paul Yates / @PYates77

06/17/2019 at 06:58PM

28
#213 - Floyd Gantt / @fgantt

06/27/2019 at 06:31PM

28
#214 - Test Name / @TestNam40177593

07/28/2019 at 11:49AM

28
#215 - Bob Ren / @bobrenjc93

07/29/2019 at 03:58PM

28
#216 - Aaron / @_Lordofthevoid_

11/23/2019 at 11:35AM

28
#217 - Ian / @IanPartials

12/16/2019 at 05:48AM

29
#218 - Adam Wilson / @adamlemurwilson

06/24/2019 at 08:10PM

29
#219 - trafficone / @trafficone

11/02/2019 at 07:10AM

29
#220 - brad / @bitsbybrad

03/04/2020 at 01:03PM

29
#221 - Rushikesh Badini / @Rushi_Badini

05/09/2021 at 06:11PM

30
#222 - dtjong / @dtjong2

06/07/2019 at 05:26AM

30
#223 - valeryan deux / @DeuxValeryan

06/07/2019 at 12:17PM

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

06/10/2019 at 05:15PM

30
#225 - Chris G / @AboutThatThing

06/12/2019 at 08:54AM

30
#226 - Phoon / @justflashhim

07/30/2019 at 12:32AM

30
#227 - Ivo Blöchliger / @aigledesalpes

08/02/2019 at 03:13PM

31
#228 - Tony Buranzon / @therealTbunz

01/06/2021 at 04:26PM

31
#229 - Pranjul Tripathi / @h0Imes221B

05/11/2021 at 09:54AM

32
#230 - pommevilla / @pawlrus

06/07/2019 at 09:49AM

32
#231 - Mike Clark / @mikeclark729

06/11/2019 at 02:25PM

32
#232 - Emil Braserud / @Erdustiggen

06/24/2019 at 01:20PM

32
#233 - Ralph Callaway / @RalphAtCCC

09/09/2019 at 11:37PM

33
#234 - grantopher orange / @grantopher

07/22/2019 at 11:40PM

34
#235 - David Nash / @david_nash

06/06/2019 at 11:03PM

34
#236 - shivam singh / @shivams52105002

05/05/2021 at 10:14AM

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

10/31/2019 at 07:51PM

37
#238 - background extra in a nightmare / @56khole

12/22/2020 at 07:59AM

43
#239 - fff / @fff51460170

02/20/2021 at 03:23PM

48
#240 - Thomas Jung / @ThomasAJung

01/21/2020 at 04:31PM