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

217 active golfers, 755 entries

Leaderboard (lowest score wins):
46
#181 - Ben Lenarts / @benlenarts

12/29/2010 at 03:36PM

46
#182 - Spam Mail / @mrfdot

05/26/2023 at 02:02AM

46
#183 - Thermospore / @Thermospore

05/22/2024 at 08:41AM

47
#184 - Peter Krenn / @peterkrenn

12/29/2010 at 01:17AM

47
#185 - Mike Plotz / @antisuji

12/29/2010 at 03:04AM

47
#186 - Soliman Sylvain / @sylvain_soliman

12/29/2010 at 05:46PM

47
#187 - ise0615 / @ise0615

05/04/2012 at 05:32PM

47
#188 - xiaoao1024 / @xiaoao1024

12/25/2023 at 09:06AM

48
#189 - Vgaccount645 / @vgaccount616132

05/10/2023 at 12:34AM

49
#190 - Simon Brown / @caelyxsec

12/29/2010 at 06:38AM

49
#191 - Lasse Højgaard / @lhojgaard

12/29/2010 at 01:17PM

49
#192 - Felipe Jaramillo F / @mrfelipe

04/16/2014 at 03:33AM

49
#193 - Sergio / @SergioVl12

07/25/2021 at 04:37AM

50
#194 - Przemysław Pawełczyk / @przemoc86

12/30/2010 at 10:52PM

50
#195 - SmoggyFog / @SmoggyFog

06/02/2023 at 01:21AM

50
#196 - KoroneListener / @KoroneListener

09/03/2024 at 06:55PM

51
#197 - Dave / @zzdave13

07/15/2011 at 01:31PM

54
#198 - theshadowhost / @theshadowhost

12/29/2010 at 01:53PM

54
#199 - Luke Ledet / @lukeledet

12/29/2010 at 03:21PM

55
#200 - Justin Knag / @justinknag

08/30/2014 at 01:15AM

58
#201 - Aaron Bull Schaefer / @elasticdog

12/29/2010 at 03:44PM

58
#202 - Chris Doble / @chrisdoble

12/30/2010 at 12:27AM

59
#203 - Duda Dornelles / @dudadornelles

12/29/2010 at 12:22AM

65
#204 - Arto Vuori / @dhpe

08/30/2012 at 08:28PM

69
#205 - ivarv / @ivarv

12/29/2010 at 08:38AM

75
#206 - Scott Atkins / @scottrick49

06/28/2021 at 02:06PM

75
#207 - nickGPT / @nickandbro

08/29/2024 at 12:27AM

77
#208 - Andreas Siegrist / @andreaszwei

02/01/2022 at 08:11PM

80
#209 - anonymouse / @anonymo65837183

03/30/2022 at 06:02AM

86
#210 - wihinenh / @wihinenh

01/07/2025 at 11:08AM