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):
18
#151 - 廖彥智 / @JeffYenchih

03/09/2020 at 10:31AM

18
#152 - Affan / @maqur_

04/01/2020 at 03:35PM

18
#153 - dule2607 / @dule26071

04/30/2020 at 07:31PM

18
#154 - vito / @vito49999722

08/01/2020 at 10:28AM

19
#155 - Ari Sweedler / @Adsweed

06/07/2019 at 12:29AM

19
#156 - Malcolm Ramsay / @malramsay64

06/07/2019 at 03:22AM

19
#157 - Am Jam / @LoneJam

06/07/2019 at 03:13PM

19
#158 - Derrick Gill / @DerrickGill15

06/08/2019 at 02:20AM

19
#159 - Altafen_ / @Altafen1

06/14/2019 at 07:17AM

19
#160 - ixf / @ixfdv

07/05/2019 at 06:41PM

19
#161 - Chris Shorrock / @EbinFlow

08/14/2019 at 02:24PM

19
#162 - None / @sh1chuang

01/09/2020 at 11:52AM

19
#163 - Rune Warhuus / @DinkDonkNorway

01/23/2020 at 10:18AM

19
#164 - edvrds / @edvrds

04/16/2020 at 04:27PM

20
#165 - seul / @seul15987381

06/12/2019 at 08:36AM

20
#166 - Alexey Vyskubov / @avysk

06/12/2019 at 01:48PM

20
#167 - Mat / @matpbo

06/14/2019 at 10:19PM

20
#168 - Sato Takayuki / @yukitaka1974

06/21/2019 at 02:57PM

20
#169 - Test Account / @testycc

06/29/2019 at 12:41PM

20
#170 - André Reigoto / @AndreReigoto

08/09/2019 at 03:10PM

20
#171 - Alex Emelianov / @AlexEmelianov3

11/03/2019 at 11:20PM

20
#172 - Wenbo / @nuxping1

12/29/2019 at 01:15PM

20
#173 - Oleg / @colega

01/29/2020 at 09:42AM

20
#174 - BnnGolfer / @BnnGolfer

03/25/2020 at 06:30PM

20
#175 - Jason / @roosjason

04/15/2020 at 06:50AM

20
#176 - Martin Kauppinen / @MartinKauppinen

08/16/2020 at 12:10PM

20
#177 - Joshua Parco / @JoshuaParco2

12/19/2020 at 03:10AM

21
#178 - Frank / @fvbever

06/07/2019 at 07:49AM

21
#179 - albalitz / @_albalitz

06/07/2019 at 08:06AM

21
#180 - Juraj Skvarla / @JurajSkvarla

06/10/2019 at 03:28PM