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

214 active golfers, 732 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

23
#13 - Peppa Pig / @PeppaPigSg

10/10/2024 at 02:56AM

24
#14 - Jon Krause / @jkrause314

12/27/2015 at 05:55AM

24
#15 - Saki Gw / @Sakigw

02/10/2017 at 02:09AM

24
#16 - Turkey Man / @lvturkeyman

11/26/2017 at 03:43PM

24
#17 - DHM / @DHM29978992

05/03/2018 at 01:15AM

24
#18 - churaki / @churaki

02/04/2019 at 04:10PM

24
#19 - Mihai / @mihaicristiant

02/26/2019 at 04:55PM

24
#20 - vimgolfer / @vimgolfer7

10/19/2019 at 11:48PM

24
#21 - Lory / @Lory46845742

12/11/2019 at 03:52PM

24
#22 - Miłosz Łakomy / @foobar01123

03/24/2020 at 05:39AM

24
#23 - Jung Yeon Park / @park_jungy

08/10/2021 at 03:27PM

24
#24 - blabla zincou / @BZincou

03/09/2022 at 05:29PM

24
#25 - Jean George / @JeanGeo20504212

04/12/2022 at 07:55AM

24
#26 - yancy / @yancy_dong

05/02/2022 at 02:49PM

24
#27 - russellzhaomao / @russellzhaomao

05/29/2022 at 11:12AM

24
#28 - Qing Liu / @poeminlash

08/07/2022 at 12:08AM

24
#29 - Janzen / @__Coos

09/15/2022 at 02:20PM

24
#30 - Zion Park / @zionpark93

01/06/2023 at 03:16AM