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 5e2786a9ee9d370009f72c0a

Hogwarts Email Sorting

Given a list of emails, get the students full name and their associated house.

Start file
james.potter@gryffindor.hogwarts.edu
sirius.black@gryffindor.hogwarts.edu
lily.potter@gryffindor.hogwarts.edu
draco.malfoy@slytherin.hogwarts.edu
harry.potter@gryffindor.hogwarts.edu
susan.bones@hufflepuff.hogwarts.edu
luna.lovegood@ravenclaw.hogwarts.edu
pansy.parkinson@slytherin.hogwarts.edu
cedric.diggory@hufflepuff.hogwarts.edu
cho.chang@hufflepuff.hogwarts.edu
End file
James Potter Gryffindor
Sirius Black Gryffindor
Lily Potter Gryffindor
Draco Malfoy Slytherin
Harry Potter Gryffindor
Susan Bones Hufflepuff
Luna Lovegood Ravenclaw
Pansy Parkinson Slytherin
Cedric Diggory Hufflepuff
Cho Chang Hufflepuff

View Diff

1,10c1,10
< james.potter@gryffindor.hogwarts.edu
< sirius.black@gryffindor.hogwarts.edu
< lily.potter@gryffindor.hogwarts.edu
< draco.malfoy@slytherin.hogwarts.edu
< harry.potter@gryffindor.hogwarts.edu
< susan.bones@hufflepuff.hogwarts.edu
< luna.lovegood@ravenclaw.hogwarts.edu
< pansy.parkinson@slytherin.hogwarts.edu
< cedric.diggory@hufflepuff.hogwarts.edu
< cho.chang@hufflepuff.hogwarts.edu
---
> James Potter Gryffindor
> Sirius Black Gryffindor
> Lily Potter Gryffindor
> Draco Malfoy Slytherin
> Harry Potter Gryffindor
> Susan Bones Hufflepuff
> Luna Lovegood Ravenclaw
> Pansy Parkinson Slytherin
> Cedric Diggory Hufflepuff
> Cho Chang Hufflepuff

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 215 remaining solutions by signing in and submitting your own entry
#216 Christophe Kafrouni / @KafrouniChris - Score: 590 - 04/29/20 @ 16:06
:%s<CR>:%s/\([<50-53>vimgolf put 5e2786a9ee9d370009f72c0a<Esc>[201~<BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><50-53>[a-z]*\<Esc>[201~<BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><50-53>:%s/\([a-z]*\)[.]\([a-z]*\)[@]\([a-z]*\).*/\u\1 \u\2 \u\3/g<CR>:wq!<CR><Esc>[201~uuuu<50-53>:%s/\([a-z]*\)[.]\([a-z]*\)[@]\([a-z]*\).*/\u\1 \u\2 \u\3/g<CR>:wq!<CR><Esc>[201~<50-53>:%s/\([a-z]*\)[.]\([a-z]*\)[@]\([a-z]*\).*/\u\1 \u\2 \u\3/g<CR>:wq!<CR><Esc>[201~uuuu:<50-53>:%s/\([a-z]*\)[.]\([a-z]*\)[@]\([a-z]*\).*/\u\1 \u\2 \u\3/g<CR>:wq!<CR><Esc>[201~<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><CR>:<50-53>%s/\([a-z]*\)[.]\([a-z]*\)[@]\([a-z]*\).*/\u\1 \u\2 \u\3/g<Esc>[201~<CR>:<50-53>:wq<Esc>[201~<CR>

0 comments


Created by: @ujwalnarayan

216 active golfers, 759 entries

Leaderboard (lowest score wins):
22
#121 - Jorge Romeu Huidobro / @jorgerom_

05/12/2020 at 03:47PM

22
#122 - Jan Fiser / @dmmn082

05/12/2020 at 06:21PM

22
#123 - a quiet misdreavus / @QuietMisdreavus

05/13/2020 at 06:40PM

22
#124 - Ebi / @ehan6

05/21/2020 at 07:02PM

22
#125 - David Bragmark / @DBragmark

05/29/2020 at 07:37PM

22
#126 - Yannick / @Yannick88147038

06/01/2020 at 05:58PM

22
#127 - RockerZZY / @rocker_zzy

06/07/2020 at 03:04AM

22
#128 - Brennan Barker / @BrennanJBarker

07/05/2020 at 04:11AM

22
#129 - Tiago Nascimento / @tigum27

07/18/2020 at 06:09PM

22
#130 - Jeff Cui / @jeffacce

07/27/2020 at 09:12AM

22
#131 - Martin Bielik / @mabielik

08/10/2020 at 07:45PM

22
#132 - Put me on your list tyrants / @electronjunkie

08/16/2020 at 01:04PM

22
#133 - Till Straube / @tillstr

08/18/2020 at 04:50PM

22
#134 - mevmev / @mevmev8

10/02/2020 at 10:57PM

22
#135 - The Valencian Dev / @thevalenciandev

10/13/2020 at 09:12AM

22
#136 - Ifeoluwa Lawal / @IfeLawl

10/14/2020 at 03:44PM

22
#137 - Leo Winters / @LeoPWinters

10/19/2020 at 06:39PM

22
#138 - Demian Martinez / @demianuco

11/02/2020 at 10:12AM

22
#139 - Zack Freedman / @freedman_zack

11/07/2020 at 09:44PM

22
#140 - drumstix576 / @drumstix576

11/20/2020 at 07:10PM

22
#141 - hepebexè / @hepebexe

11/30/2020 at 10:31PM

22
#142 - Jon Powers / @JonKPowers

12/15/2020 at 07:42PM

22
#143 - John Doe / @JohnDoe75830353

12/24/2020 at 02:06AM

22
#144 - Björn Struckmeier / @BjrnStruckmeie1

01/07/2021 at 12:43PM

22
#145 - 영훈 / @odjfnrtm

01/19/2021 at 01:04AM

23
#146 - Hector Davensburg / @hdavensburg

01/26/2020 at 12:46PM

23
#147 - Aníbal / @anibal10

02/02/2020 at 10:42AM

23
#148 - Sander Vanhove / @SanderVhove

02/05/2020 at 09:12AM

23
#149 - TheSemicolon / @the_semicolon_

02/25/2020 at 05:20PM

23
#150 - kacper kazaniecki / @KacperKazan

03/13/2020 at 04:56PM