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

262 active golfers, 928 entries

Leaderboard (lowest score wins):
21
#61 - garry quested / @GQuested

01/23/2020 at 10:02AM

21
#62 - Noisome Possum / @NoisomePossum

01/23/2020 at 04:54PM

21
#63 - Scott Smith / @Scottaino

01/25/2020 at 12:06AM

21
#64 - Quentin Plazar / @QuentinPlazar

01/27/2020 at 07:40AM

21
#65 - TimMcGuire / @mcguire

02/03/2020 at 07:33PM

21
#66 - Emil / @emilklindt

02/04/2020 at 07:50PM

21
#67 - Robber Toe / @robbertoe

02/09/2020 at 03:06AM

21
#68 - stretchy / @stretch11013132

02/16/2020 at 03:09PM

21
#69 - KingYames / @JamesZeHunter

02/17/2020 at 05:19AM

21
#70 - Rollo Jenkins / @rollo_jenkins

02/18/2020 at 05:04PM

21
#71 - golferN / @golferN3

02/25/2020 at 08:38PM

21
#72 - Johnny John / @JohnnyJ74406671

02/28/2020 at 09:12AM

21
#73 - floyd / @floyd10086

03/01/2020 at 04:22PM

21
#74 - Alexander Bessonov / @nonsleepr

03/02/2020 at 02:15PM

21
#75 - Matt Drover / @mdrover25

03/05/2020 at 06:28PM

21
#76 - Paul Parker / @PaulDesmoParker

03/06/2020 at 11:10PM

21
#77 - Adam Hartz / @awareofnow

03/09/2020 at 06:35PM

21
#78 - 薛浩滎 / @iTPChbTeI4ZW9s3

03/17/2020 at 04:59AM

21
#79 - vvaannaa3 / @vvaannaa3

03/21/2020 at 10:11PM

21
#80 - BnnGolfer / @BnnGolfer

03/22/2020 at 09:45PM

21
#81 - Seve / @Seve_py

04/09/2020 at 03:26PM

21
#82 - Roger Stoltz / @rogsto1

04/23/2020 at 10:00PM

21
#83 - Quentin Leroy / @qnleroy

05/14/2020 at 06:30PM

21
#84 - Rob Pilling / @bobrippling

05/19/2020 at 05:00PM

21
#85 - LCY / @Chooneh

06/05/2020 at 10:04AM

21
#86 - otfsenter / @otfsenter

06/06/2020 at 11:15AM

21
#87 - mocihan / @mocihan

07/01/2020 at 12:33PM

21
#88 - Tanzeel Kazi / @tanzeelkazi

08/13/2020 at 08:31AM

21
#89 - Vildu / @Vildu3

09/30/2020 at 10:56AM

21
#90 - Ivan Kwong / @IvanKwong5

10/04/2020 at 07:30AM