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

155 active golfers, 561 entries

Leaderboard (lowest score wins):
22
#61 - Vim太郎@Vim入門 管理人 / @VimTry

01/22/2020 at 02:34AM

22
#62 - Felix Boers / @felixboers

01/22/2020 at 07:17AM

22
#63 - Jan Bundesmann / @janbundesmann

01/22/2020 at 08:32AM

22
#64 - mowglian / @mowglian

01/22/2020 at 09:35AM

22
#65 - Rune Warhuus / @DinkDonkNorway

01/22/2020 at 12:21PM

22
#66 - Thomas Jung / @ThomasAJung

01/22/2020 at 05:37PM

22
#67 - Jason Neylon / @jasonneylon

01/22/2020 at 07:45PM

22
#68 - Brent Westbrook / @westbrook_brent

01/22/2020 at 09:29PM

22
#69 - みなもと / @sminamot

01/23/2020 at 01:45PM

22
#70 - Tom van der Lee / @TomVdLee

01/23/2020 at 02:07PM

22
#71 - Andre / @5starsmug

01/24/2020 at 12:17PM

22
#72 - Tinko Minko / @tandikula

01/24/2020 at 09:56PM

22
#73 - Michael Meixner / @meixner62

01/25/2020 at 02:33PM

22
#74 - Lukas Klingberg / @ElKlingberg

01/26/2020 at 05:13PM

22
#75 - Gytis Vinclovas / @GytisVinclovas

01/27/2020 at 10:50AM

22
#76 - Jon Crowe / @joncrowe

01/27/2020 at 12:00PM

22
#77 - Daniel Steinberg / @dstein64

01/31/2020 at 12:50AM

22
#78 - Sushrut Shirole / @sushrutshirole

01/31/2020 at 12:54AM

22
#79 - Bachelor / @bachelorwang

02/04/2020 at 05:28AM

22
#80 - cardoiltardo / @cardoiltardo

02/04/2020 at 07:11PM

22
#81 - Renns / @Renns95250521

02/07/2020 at 11:44PM

22
#82 - Falafel Palapel / @falafelpalapel

02/12/2020 at 05:49PM

22
#83 - Ali Kero / @stochastist

02/13/2020 at 10:05PM

22
#84 - vimgolf_tmp_2 / @2Vimgolf

02/16/2020 at 04:27PM

22
#85 - brightlyopen / @brightlyopen

02/22/2020 at 08:48PM

22
#86 - David Hume / @djh95

02/26/2020 at 09:53PM

22
#87 - William Profit / @william_profit

03/13/2020 at 03:12PM

22
#88 - Sean Dewar / @seandewar

03/13/2020 at 04:18PM

22
#89 - vtls / @vtls16

03/14/2020 at 12:57PM

22
#90 - asierrayk / @asierrayk

03/14/2020 at 01:35PM