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):
29
#91 - Paul King / @nrocy

12/30/2010 at 07:01AM

29
#92 - Pierre / @Pihour

01/01/2011 at 02:43AM

29
#93 - Asmund / @herrasbe

01/02/2011 at 06:08PM

29
#94 - James Cash / @jamesnvc

01/06/2011 at 01:55PM

29
#95 - Ruy Diaz / @diazruy

06/09/2011 at 05:13PM

29
#96 - Lieven Keersmaekers / @LievenKeersmaek

01/18/2013 at 08:09PM

29
#97 - Matt Adelman / @Xavierstein

03/20/2013 at 08:31PM

29
#98 - cj / @cj01101

08/26/2013 at 09:24PM

29
#99 - James Potter / @JJPotterkowski

10/31/2015 at 11:21PM

29
#100 - Laurent Atlan / @laurentatlan1

01/01/2016 at 01:16AM

29
#101 - RockerZZY / @rocker_zzy

06/29/2020 at 02:30AM

29
#102 - POSIX / @po6ix

01/31/2022 at 05:14PM

30
#103 - Matthew Draper / @_matthewd

01/01/2011 at 04:33AM

30
#104 - Cristi Balan / @evilchelu

01/01/2011 at 06:36AM

30
#105 - kmymtksh / @kmymtksh

01/03/2011 at 07:58AM

30
#106 - brett / @brettyukich

09/22/2013 at 09:31PM

30
#107 - James / @Dronak

08/21/2014 at 05:20PM

31
#108 - Ilya Strukov / @i1ey

05/01/2011 at 06:39PM

31
#109 - Jason Wolf / @zephyr_wolf

11/08/2012 at 06:05PM

31
#110 - Daniel / @Daniel00288663

04/04/2017 at 07:34AM

31
#111 - Michael Meixner / @meixner62

01/24/2020 at 12:50PM

32
#112 - Shawn Tice / @shtice

12/29/2010 at 12:59AM

32
#113 - Andrew Scala / @agscala

12/29/2010 at 07:51AM

32
#114 - Øystein Walle / @oysteinwalle

07/06/2011 at 11:28PM

32
#115 - x03n046 / @x03n046

05/16/2022 at 08:45AM

33
#116 - David Wolever / @wolever

12/29/2010 at 12:16AM

33
#117 - Peter Anselmo / @peter_anselmo

12/31/2010 at 04:01AM

33
#118 - vansan / @VinceVansan

08/25/2012 at 08:00PM

33
#119 - くま ก็็็็็็็็็็็็็ʕ•͡ᴥ•ʔ ก้้้้้้้้้้้ 55 / @kumack55

04/08/2013 at 01:25AM

34
#120 - Steven Grady / @steven807

12/29/2010 at 12:45AM