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

198 active golfers, 647 entries

Leaderboard (lowest score wins):
26
#61 - dominique pellé / @vimgolfisto

01/03/2011 at 01:39PM

26
#62 - Federico Galassi / @federicogalassi

02/01/2011 at 01:33AM

26
#63 - vg / @vimgolfer

02/26/2011 at 11:44AM

26
#64 - Jason Then / @racc69

08/09/2011 at 01:45AM

26
#65 - Ali Moeeny MD PhD / @alimoeeny

12/17/2011 at 03:27PM

26
#66 - Zeh Rizzatti / @zehrizzatti

02/07/2012 at 03:03AM

26
#67 - drupalovereasy / @drupalovereasy

04/27/2012 at 02:37AM

26
#68 - Kerson Hsiao / @KersonHsiao

07/25/2012 at 09:21AM

26
#69 - Hubba / @HubbaBubbaFett

12/06/2012 at 08:36PM

26
#70 - Yann Moisan / @YannMoisan

02/02/2013 at 02:32PM

26
#71 - Trevor Powell / @DoomedBunnies

03/21/2013 at 12:08AM

26
#72 - Will / @obiwan__k3n00bi

08/25/2016 at 04:59AM

26
#73 - Paul Draghicescu / @pdragy

03/23/2018 at 04:46AM

26
#74 - Michael / @openemitter

12/27/2023 at 10:43PM

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

01/15/2011 at 03:29PM

27
#76 - William Dunand / @wdunand

12/07/2011 at 09:10AM

27
#77 - Nolen Royalty / @NolenRoyalty

04/21/2012 at 11:56PM

27
#78 - Chris Brown / @engineercyb

07/13/2012 at 04:10AM

27
#79 - tmr / @tmr314

09/05/2012 at 08:07PM

27
#80 - Eric Potter / @pottereric

06/12/2013 at 01:48AM

27
#81 - Matt / @mcr05

12/11/2014 at 05:31PM

28
#82 - Jim Garvin / @coderifous

12/31/2010 at 03:27AM

28
#83 - Fer Enaf / @0x00C0FFEE

01/05/2011 at 11:19AM

28
#84 - Pete Johns / @johnsyweb

01/09/2011 at 09:57AM

28
#85 - Steve Morrow / @yawmark

01/13/2011 at 04:34AM

28
#86 - Jim Infield / @jinfield

07/19/2011 at 06:29PM

28
#87 - Andrey Ivanov / @Bytamine

08/09/2011 at 12:37PM

28
#88 - quintin / @quintinjeannoel

08/29/2011 at 11:24PM

28
#89 - Daniel Lundin / @danielundin

02/19/2013 at 12:09PM

28
#90 - Bart of Denver / @bartofdenver

08/13/2013 at 04:34AM