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

217 active golfers, 935 entries

Leaderboard (lowest score wins):
19
#121 - Derrick Gill / @DerrickGill15

06/08/2019 at 02:20AM

19
#122 - Altafen_ / @Altafen1

06/14/2019 at 07:17AM

19
#123 - ixf / @ixfdv

07/05/2019 at 06:41PM

19
#124 - Chris Shorrock / @EbinFlow

08/14/2019 at 02:24PM

19
#125 - None / @sh1chuang

01/09/2020 at 11:52AM

19
#126 - Rune Warhuus / @DinkDonkNorway

01/23/2020 at 10:18AM

19
#127 - edvrds / @edvrds

04/16/2020 at 04:27PM

20
#128 - seul / @seul15987381

06/12/2019 at 08:36AM

20
#129 - Alexey Vyskubov / @avysk

06/12/2019 at 01:48PM

20
#130 - Mat / @matpbo

06/14/2019 at 10:19PM

20
#131 - Takayuki Sato / @yukitaka1974

06/21/2019 at 02:57PM

20
#132 - Test Account / @testycc

06/29/2019 at 12:41PM

20
#133 - André Reigoto / @AndreReigoto

08/09/2019 at 03:10PM

20
#134 - Alex Emelianov / @AlexEmelianov3

11/03/2019 at 11:20PM

20
#135 - Wenbo / @nuxping1

12/29/2019 at 01:15PM

20
#136 - Oleg / @colega

01/29/2020 at 09:42AM

20
#137 - BnnGolfer / @BnnGolfer

03/25/2020 at 06:30PM

20
#138 - Jason / @roosjason

04/15/2020 at 06:50AM

21
#139 - Frank / @fvbever

06/07/2019 at 07:49AM

21
#140 - albalitz / @_albalitz

06/07/2019 at 08:06AM

21
#141 - Juraj Skvarla / @JurajSkvarla

06/10/2019 at 03:28PM

21
#142 - Raphael / @Console64

06/10/2019 at 03:37PM

21
#143 - Prashanth / @Prashanth157T

06/12/2019 at 04:12AM

21
#144 - Paul Inc / @hiniol1982

06/23/2019 at 08:20AM

21
#145 - Aurel / @AurelienFebvre

06/23/2019 at 08:06PM

21
#146 - Καράτε Μόνο / @karate_mono

06/24/2019 at 12:38PM

21
#147 - Egor Fedkin / @Jet_Flynn

06/25/2019 at 07:35AM

21
#148 - Karan Gajwani / @karangb

07/12/2019 at 10:23PM

21
#149 - Ben Allan / @hellobenallan

08/19/2019 at 01:56PM

21
#150 - kevinski / @kevinsk30746831

08/22/2019 at 03:46PM