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

161 active golfers, 510 entries

Leaderboard (lowest score wins):
23
#1 - Urtica dioica / @udioica

06/12/2012 at 12:19AM

23
#2 - Charles Gordon / @liberalbias

08/25/2012 at 11:09PM

23
#3 - Conner McDaniel / @connermcd

09/18/2012 at 08:20PM

23
#4 - Victor Ramirez / @virako

10/13/2012 at 01:56AM

23
#5 - Jimmy Mabey / @mabeyj

01/23/2013 at 12:30AM

23
#6 - xavier kt / @xav_kt

02/04/2013 at 10:48PM

23
#7 - Brent Carmer / @brent_carmer

04/09/2013 at 02:55AM

23
#8 - Marco Hinz / @_mhinz_

05/22/2013 at 12:02AM

23
#9 - Bradd Szonye / @bszonye

07/15/2013 at 08:37AM

23
#10 - Petro Тrouq / @zulolosi

07/19/2013 at 07:19PM

23
#11 - John Braxler / @braxler

05/04/2014 at 04:41PM

23
#12 - LC / @leeren

08/11/2014 at 02:05AM

24
#13 - Jon Krause / @jkrause314

12/27/2015 at 05:55AM

24
#14 - Saki Gw / @Sakigw

02/10/2017 at 02:09AM

24
#15 - Turkey Man / @lvturkeyman

11/26/2017 at 03:43PM

24
#16 - DHM / @DHM29978992

05/03/2018 at 01:15AM

25
#17 - derp derp / @derp__

01/05/2011 at 08:47PM

25
#18 - Wei Dai / @clvv42

01/06/2011 at 10:15AM

25
#19 - Ujjwol Lamichhane / @Ujjwol

01/06/2011 at 11:58AM

25
#20 - Tim Chase / @gumnos

01/08/2011 at 04:08AM

25
#21 - Balkoth / @_Balkoth_

01/08/2011 at 05:15PM

25
#22 - (Emile (Swarts)) / @EmileSwarts

05/30/2011 at 01:15PM

25
#23 - Justin Love / @wondible

06/12/2011 at 03:54AM

25
#24 - Hu Junfeng / @junfeng

07/16/2011 at 08:30AM

25
#25 - Ivan Evtukhovich / @evtuhovich

08/28/2011 at 08:41PM

25
#26 - Tim Tsu / @vimgolfpunk

09/04/2011 at 01:41AM

25
#27 - You-Siang Lin / @yslinnctu

11/29/2011 at 12:30PM

25
#28 - Pei-Lun Lee / @ypcatw

02/04/2012 at 08:26AM

25
#29 - Renat Aksitov / @Korvin79

02/06/2012 at 04:40AM

25
#30 - Ravil Bayramgalin / @brainopia

03/18/2012 at 11:02PM