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

217 active golfers, 766 entries

Leaderboard (lowest score wins):
21
#61 - floyd / @floyd10086

03/01/2020 at 04:22PM

21
#62 - Alexander Bessonov / @nonsleepr

03/02/2020 at 02:15PM

21
#63 - Matt Drover / @mdrover25

03/05/2020 at 06:28PM

21
#64 - Paul Parker / @PaulDesmoParker

03/06/2020 at 11:10PM

21
#65 - Adam Hartz / @awareofnow

03/09/2020 at 06:35PM

21
#66 - 薛浩滎 / @iTPChbTeI4ZW9s3

03/17/2020 at 04:59AM

21
#67 - vvaannaa3 / @vvaannaa3

03/21/2020 at 10:11PM

21
#68 - BnnGolfer / @BnnGolfer

03/22/2020 at 09:45PM

21
#69 - Seve / @Seve_py

04/09/2020 at 03:26PM

21
#70 - Roger Stoltz / @rogsto1

04/23/2020 at 10:00PM

21
#71 - Quentin Leroy / @qnleroy

05/14/2020 at 06:30PM

21
#72 - Rob Pilling / @bobrippling

05/19/2020 at 05:00PM

21
#73 - LCY / @Chooneh

06/05/2020 at 10:04AM

21
#74 - otfsenter / @otfsenter

06/06/2020 at 11:15AM

21
#75 - mocihan / @mocihan

07/01/2020 at 12:33PM

21
#76 - Tanzeel Kazi / @tanzeelkazi

08/13/2020 at 08:31AM

21
#77 - Vildu / @Vildu3

09/30/2020 at 10:56AM

21
#78 - Ivan Kwong / @IvanKwong5

10/04/2020 at 07:30AM

21
#79 - MySelf / @okmslf

10/21/2020 at 04:12PM

21
#80 - Alice / @Alice92541388

10/22/2020 at 01:52AM

21
#81 - chocolate / @chocola81394123

12/03/2020 at 02:35AM

21
#82 - roudens / @roudens2

12/20/2020 at 02:39PM

21
#83 - Ray Dennis / @raysden

12/24/2020 at 02:18PM

21
#84 - A A A / @37fatos

01/10/2021 at 07:54PM

22
#85 - Derek Schrock / @derekschrock

01/21/2020 at 11:34PM

22
#86 - Vim太郎@Vim入門 管理人 / @VimTry

01/22/2020 at 02:34AM

22
#87 - Felix Boers / @felixboers

01/22/2020 at 07:17AM

22
#88 - Jan Bundesmann / @janbundesmann

01/22/2020 at 08:32AM

22
#89 - mowglian / @mowglian

01/22/2020 at 09:35AM

22
#90 - Rune Warhuus / @DinkDonkNorway

01/22/2020 at 12:21PM