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):
22
#121 - Michael Meixner / @meixner62

01/25/2020 at 02:33PM

22
#122 - Lukas Klingberg / @ElKlingberg

01/26/2020 at 05:13PM

22
#123 - Gytis Vinclovas / @GytisVinclovas

01/27/2020 at 10:50AM

22
#124 - Jon Crowe / @joncrowe

01/27/2020 at 12:00PM

22
#125 - Dan / @dstein64

01/31/2020 at 12:50AM

22
#126 - Sushrut Shirole / @sushrutshirole

01/31/2020 at 12:54AM

22
#127 - Bachelor / @bachelorwang

02/04/2020 at 05:28AM

22
#128 - cardoiltardo / @cardoiltardo

02/04/2020 at 07:11PM

22
#129 - Renns / @Renns95250521

02/07/2020 at 11:44PM

22
#130 - Falafel Palapel / @falafelpalapel

02/12/2020 at 05:49PM

22
#131 - Ali Kero / @stochastist

02/13/2020 at 10:05PM

22
#132 - vimgolf_tmp_2 / @2Vimgolf

02/16/2020 at 04:27PM

22
#133 - brightlyopen / @brightlyopen

02/22/2020 at 08:48PM

22
#134 - David Hume / @djh95

02/26/2020 at 09:53PM

22
#135 - William Profit / @william_profit

03/13/2020 at 03:12PM

22
#136 - Sean Dewar / @seandewar

03/13/2020 at 04:18PM

22
#137 - vtls / @vtls16

03/14/2020 at 12:57PM

22
#138 - asierrayk / @asierrayk

03/14/2020 at 01:35PM

22
#139 - Ryan Nevius / @ryannevius

03/17/2020 at 05:21PM

22
#140 - Rodrigo V. Lopes / @rodvlopes

03/28/2020 at 02:35AM

22
#141 - bluemartian / @bluemartianz59

03/29/2020 at 02:37PM

22
#142 - fedja golf / @fedjagolf

04/13/2020 at 02:37AM

22
#143 - 廖彥智 / @JeffYenchih

04/15/2020 at 10:03AM

22
#144 - volandkit / @volandkit

04/20/2020 at 06:22PM

22
#145 - Jorge Romeu Huidobro / @jorgerom_

05/12/2020 at 03:47PM

22
#146 - Jan Fiser / @dmmn082

05/12/2020 at 06:21PM

22
#147 - @QuietMisdreavus@squad.town / @QuietMisdreavus

05/13/2020 at 06:40PM

22
#148 - Ebi / @ehan6

05/21/2020 at 07:02PM

22
#149 - David Bragmark / @DBragmark

05/29/2020 at 07:37PM

22
#150 - Yannick / @Yannick88147038

06/01/2020 at 05:58PM