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 104 remaining solutions by signing in and submitting your own entry
#105 rolando / @ro1_ando - Score: 65 - 03/31/20 @ 23:04
:%s/\([a-z]*\)[.]\([a-z]*\)[@]\([a-z]*\).*/\u\1 \u\2 \u\3/g<CR>:wq!<CR>

0 comments


Created by: @ujwalnarayan

105 active golfers, 365 entries

Leaderboard (lowest score wins):
20
#1 - Saki Gw / @Sakigw

01/22/2020 at 10:41AM

20
#2 - Smylers / @Smylers2

01/22/2020 at 11:14AM

20
#3 - Ollin Boer Bohan / @madebyollin

01/22/2020 at 03:07PM

20
#4 - Ujwal Narayan / @ujwalnarayan

01/22/2020 at 04:17PM

20
#5 - Karnival K / @K4rnival

01/22/2020 at 07:31PM

20
#6 - Tefe / @tefetic

01/24/2020 at 05:47PM

20
#7 - John Braxler / @braxler

01/24/2020 at 07:30PM

20
#8 - Daniel Simionato / @weseven

01/26/2020 at 12:34PM

20
#9 - nicosierra / @nicosierra84

01/26/2020 at 10:30PM

20
#10 - Kyle X. Clark / @KyXr_Clark

01/26/2020 at 11:24PM

20
#11 - Oleg / @colega

01/28/2020 at 08:49PM

20
#12 - Jean-Francois Parent / @hacker_pyrat

01/31/2020 at 12:59AM

20
#13 - bruno cunha / @bruiserwins

02/02/2020 at 12:03AM

20
#14 - jrddp / @jrddp0

02/13/2020 at 05:16PM

20
#15 - howanto / @ho_wan_

02/18/2020 at 01:56PM

20
#16 - Ard / @kokojarjar

02/18/2020 at 02:19PM

20
#17 - yhetsugiHMC / @yhetsugi

02/20/2020 at 02:19AM

20
#18 - Strages / @Strages2k

02/23/2020 at 02:04AM

20
#19 - countime / @countime1

03/05/2020 at 03:01AM

20
#20 - Toby Hawkins / @Toby_Hawkins

03/15/2020 at 12:30AM

20
#21 - Niklas Ydeb├Ąck / @Ydebaeck

03/16/2020 at 11:43PM

20
#22 - Marco / @Marco24456514

03/21/2020 at 11:13PM

21
#23 - garry quested / @GQuested

01/23/2020 at 10:02AM

21
#24 - Noisome Possum / @NoisomePossum

01/23/2020 at 04:54PM

21
#25 - Scott Smith / @Scottaino

01/25/2020 at 12:06AM

21
#26 - Quentin Plazar / @QuentinPlazar

01/27/2020 at 07:40AM

21
#27 - TimMcGuire / @mcguire

02/03/2020 at 07:33PM

21
#28 - Emil / @emilklindt

02/04/2020 at 07:50PM

21
#29 - Robber Toe / @robbertoe

02/09/2020 at 03:06AM

21
#30 - stretchy / @stretch11013132

02/16/2020 at 03:09PM