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

186 active golfers, 586 entries

Leaderboard (lowest score wins):
26
#61 - drupalovereasy / @drupalovereasy

04/27/2012 at 02:37AM

26
#62 - Kerson Hsiao / @KersonHsiao

07/25/2012 at 09:21AM

26
#63 - Hubba / @HubbaBubbaFett

12/06/2012 at 08:36PM

26
#64 - Yann Moisan / @YannMoisan

02/02/2013 at 02:32PM

26
#65 - Trevor Powell / @DoomedBunnies

03/21/2013 at 12:08AM

26
#66 - Will / @obiwan__k3n00bi

08/25/2016 at 04:59AM

26
#67 - Paul Draghicescu / @pdragy

03/23/2018 at 04:46AM

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

01/15/2011 at 03:29PM

27
#69 - William Dunand / @wdunand

12/07/2011 at 09:10AM

27
#70 - Nolen Royalty / @NolenRoyalty

04/21/2012 at 11:56PM

27
#71 - Chris Brown / @engineercyb

07/13/2012 at 04:10AM

27
#72 - tmr / @tmr314

09/05/2012 at 08:07PM

27
#73 - Eric Potter / @pottereric

06/12/2013 at 01:48AM

27
#74 - Matt / @mcr05

12/11/2014 at 05:31PM

28
#75 - Jim Garvin / @coderifous

12/31/2010 at 03:27AM

28
#76 - Fer Enaf / @0x00C0FFEE

01/05/2011 at 11:19AM

28
#77 - Pete Johns / @johnsyweb

01/09/2011 at 09:57AM

28
#78 - Steve Morrow / @yawmark

01/13/2011 at 04:34AM

28
#79 - Jim Infield / @jinfield

07/19/2011 at 06:29PM

28
#80 - Andrey Ivanov / @Bytamine

08/09/2011 at 12:37PM

28
#81 - quintin / @quintinjeannoel

08/29/2011 at 11:24PM

28
#82 - Daniel Lundin / @danielundin

02/19/2013 at 12:09PM

28
#83 - Bart of Denver / @bartofdenver

08/13/2013 at 04:34AM

28
#84 - Zapata / @Incredible_JFP

05/14/2014 at 03:18PM

28
#85 - Walker Boh / @walker_boh

11/18/2015 at 10:20AM

28
#86 - Gurukandhamoorthi / @Gurukandhamoor1

07/30/2017 at 03:18PM

28
#87 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 06:39PM

28
#88 - Tyler Carson / @tylerccarson

03/23/2022 at 03:52PM

29
#89 - Samus_ Michael / @gonna_hate

12/29/2010 at 04:44AM

29
#90 - uuu / @uu59

12/29/2010 at 11:40PM