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):
25
#31 - Renat Aksitov / @Korvin79

02/06/2012 at 04:40AM

25
#32 - Ravil Bayramgalin / @brainopia

03/18/2012 at 11:02PM

25
#33 - Rod Knowlton / @codelahoma

05/27/2012 at 12:55AM

25
#34 - mwatkward / @AftrschoolSpe

07/06/2012 at 11:56AM

25
#35 - Vim rocks / @vimrocks

10/07/2012 at 12:23PM

25
#36 - Darcy Parker / @DarcyParker

10/18/2012 at 07:15PM

25
#37 - Marcin Sza / @coot_

11/27/2012 at 07:46AM

25
#38 - a24f0600 / @a24f0600

12/19/2012 at 05:52PM

25
#39 - Alec Goebel / @zego5360

01/07/2013 at 01:37AM

25
#40 - Tyler / @tylerbindon

03/31/2013 at 03:11PM

25
#41 - wushexu / @wushexu

06/01/2013 at 03:21PM

25
#42 - Joonas Pihlajamaa / @jokkebk

02/23/2014 at 04:43PM

25
#43 - Ram Tamtam / @ramtamtamtam

07/01/2014 at 12:21PM

25
#44 - pftb12345 / @pftb12345

04/15/2015 at 05:17AM

25
#45 - Evgeny`s Kindle / @EvgenyKindle

05/10/2018 at 07:53AM

26
#46 - dominique pellé / @vimgolfisto

01/03/2011 at 01:39PM

26
#47 - Federico Galassi / @federicogalassi

02/01/2011 at 01:33AM

26
#48 - vg / @vimgolfer

02/26/2011 at 11:44AM

26
#49 - Jason Then / @racc69

08/09/2011 at 01:45AM

26
#50 - Ali Moeeny / @alimoeeny

12/17/2011 at 03:27PM

26
#51 - Zeh Rizzatti / @zehrizzatti

02/07/2012 at 03:03AM

26
#52 - drupalovereasy / @drupalovereasy

04/27/2012 at 02:37AM

26
#53 - Kerson Hsiao / @KersonHsiao

07/25/2012 at 09:21AM

26
#54 - Hubba / @HubbaBubbaFett

12/06/2012 at 08:36PM

26
#55 - Yann Moisan / @YannMoisan

02/02/2013 at 02:32PM

26
#56 - Trevor Powell / @DoomedBunnies

03/21/2013 at 12:08AM

26
#57 - Will / @obiwan__k3n00bi

08/25/2016 at 04:59AM

26
#58 - Paul Draghicescu / @pdragy

03/23/2018 at 04:46AM

27
#59 - h_east (トロッコ6個) / @h_east

01/15/2011 at 03:29PM

27
#60 - William Dunand / @wdunand

12/07/2011 at 09:10AM