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 4d1a790fb8cb3409320001a8

Reformat most common surnames

Reformat copy-pasted table into a list of the most common surnames

Start file
Surname  	Approx Number  	% Frequency  	Rank  
SMITH	 2,501,922	1.006	1
JOHNSON	 2,014,470	0.81	2
WILLIAMS	 1,738,413	0.699	3
JONES	 1,544,427	0.621	4
BROWN	 1,544,427	0.621	5
DAVIS	 1,193,760	0.48	6
MILLER	 1,054,488	0.424	7
WILSON	 843,093	0.339	8
MOORE	 775,944	0.312	9
TAYLOR	 773,457	0.311	10
End file
1. Smith
2. Johnson
3. Williams
4. Jones
5. Brown
6. Davis
7. Miller
8. Wilson
9. Moore
10. Taylor

View Diff

1,11c1,10
< Surname  	Approx Number  	% Frequency  	Rank  
< SMITH	 2,501,922	1.006	1
< JOHNSON	 2,014,470	0.81	2
< WILLIAMS	 1,738,413	0.699	3
< JONES	 1,544,427	0.621	4
< BROWN	 1,544,427	0.621	5
< DAVIS	 1,193,760	0.48	6
< MILLER	 1,054,488	0.424	7
< WILSON	 843,093	0.339	8
< MOORE	 775,944	0.312	9
< TAYLOR	 773,457	0.311	10
---
> 1. Smith
> 2. Johnson
> 3. Williams
> 4. Jones
> 5. Brown
> 6. Davis
> 7. Miller
> 8. Wilson
> 9. Moore
> 10. Taylor

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 163 remaining solutions by signing in and submitting your own entry
#164 Mike Cooper / @mythmon - Score: 193 - 12/29/10 @ 23:38
dd:%s/\(.*\)\t.(<BS>*\t.*\t\(.*\)$/\2. \1/g<CR>Vkkkkkkkkkkkk:%s/[<BS>\([A-Z]\)\(.*\)/\1\L\2/<CR>:<Up><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><BS><BS><BS><BS><CR>:wq<CR>

0 comments


Created by: @lionelyoung

164 active golfers, 520 entries

Leaderboard (lowest score wins):
27
#61 - Nolen Royalty / @NolenRoyalty

04/21/2012 at 11:56PM

27
#62 - Chris Brown / @engineercyb

07/13/2012 at 04:10AM

27
#63 - tmr / @tmr314

09/05/2012 at 08:07PM

27
#64 - Eric Potter / @pottereric

06/12/2013 at 01:48AM

27
#65 - Matthieu Crapet / @mcr05

12/11/2014 at 05:31PM

28
#66 - Jim Garvin / @coderifous

12/31/2010 at 03:27AM

28
#67 - Fer Enaf / @0x00C0FFEE

01/05/2011 at 11:19AM

28
#68 - Pete Johns / @johnsyweb

01/09/2011 at 09:57AM

28
#69 - Stephen Morrow / @yawmark

01/13/2011 at 04:34AM

28
#70 - Jim Infield / @jinfield

07/19/2011 at 06:29PM

28
#71 - Andrey Ivanov / @Bytamine

08/09/2011 at 12:37PM

28
#72 - quintin / @quintinjeannoel

08/29/2011 at 11:24PM

28
#73 - Daniel Lundin / @danielundin

02/19/2013 at 12:09PM

28
#74 - Bart of Denver / @bartofdenver

08/13/2013 at 04:34AM

28
#75 - Zapata / @Incredible_JFP

05/14/2014 at 03:18PM

28
#76 - Walker Boh / @walker_boh

11/18/2015 at 10:20AM

28
#77 - Gurukandhamoorthi / @Gurukandhamoor1

07/30/2017 at 03:18PM

29
#78 - Samus_ Michael / @gonna_hate

12/29/2010 at 04:44AM

29
#79 - uuu / @uu59

12/29/2010 at 11:40PM

29
#80 - Paul King / @nrocy

12/30/2010 at 07:01AM

29
#81 - Pierre / @Pihour

01/01/2011 at 02:43AM

29
#82 - Asmund / @herrasbe

01/02/2011 at 06:08PM

29
#83 - James Cash / @jamesnvc

01/06/2011 at 01:55PM

29
#84 - Ruy Diaz / @diazruy

06/09/2011 at 05:13PM

29
#85 - Lieven Keersmaekers / @LievenKeersmaek

01/18/2013 at 08:09PM

29
#86 - Matt Adelman / @Xavierstein

03/20/2013 at 08:31PM

29
#87 - cj / @cj01101

08/26/2013 at 09:24PM

29
#88 - James Potter / @JJPotterkowski

10/31/2015 at 11:21PM

29
#89 - Laurent Atlan / @laurentatlan1

01/01/2016 at 01:16AM

30
#90 - Matthew Draper / @_matthewd

01/01/2011 at 04:33AM