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 4d29ae2107e0177c7e000036

Before there was Farmville...

There was old MacDonald. For my toddler. The first Vim sing-a-long?

Start file
cows moo
horses neigh
ducks quack
geese honk
hens cluck
chicks peep
pigs oink
sheep baa
End file
Old MacDonald had a farm, E I E I O.
And on that farm he had a cow, E I E I O.
With a moo, moo here and a moo, moo there.
Here a moo, there a moo, everywhere a moo, moo.
Old MacDonald had a farm, E I E I O.

Old MacDonald had a farm, E I E I O.
And on that farm he had a horse, E I E I O.
With a neigh, neigh here and a neigh, neigh there.
Here a neigh, there a neigh, everywhere a neigh, neigh.
Old MacDonald had a farm, E I E I O.

Old MacDonald had a farm, E I E I O.
And on that farm he had a duck, E I E I O.
With a quack, quack here and a quack, quack there.
Here a quack, there a quack, everywhere a quack, quack.
Old MacDonald had a farm, E I E I O.

Old MacDonald had a farm, E I E I O.
And on that farm he had a goose, E I E I O.
With a honk, honk here and a honk, honk there.
Here a honk, there a honk, everywhere a honk, honk.
Old MacDonald had a farm, E I E I O.

Old MacDonald had a farm, E I E I O.
And on that farm he had a hen, E I E I O.
With a cluck, cluck here and a cluck, cluck there.
Here a cluck, there a cluck, everywhere a cluck, cluck.
Old MacDonald had a farm, E I E I O.

Old MacDonald had a farm, E I E I O.
And on that farm he had a chick, E I E I O.
With a peep, peep here and a peep, peep there.
Here a peep, there a peep, everywhere a peep, peep.
Old MacDonald had a farm, E I E I O.

Old MacDonald had a farm, E I E I O.
And on that farm he had a pig, E I E I O.
With an oink, oink here and an oink, oink there.
Here an oink, there an oink, everywhere an oink, oink.
Old MacDonald had a farm, E I E I O.

Old MacDonald had a farm, E I E I O.
And on that farm he had a sheep, E I E I O.
With a baa, baa here and a baa, baa there.
Here a baa, there a baa, everywhere a baa, baa.
Old MacDonald had a farm, E I E I O.

View Diff

1,8c1,47
< cows moo
< horses neigh
< ducks quack
< geese honk
< hens cluck
< chicks peep
< pigs oink
< sheep baa
---
> Old MacDonald had a farm, E I E I O.
> And on that farm he had a cow, E I E I O.
> With a moo, moo here and a moo, moo there.
> Here a moo, there a moo, everywhere a moo, moo.
> Old MacDonald had a farm, E I E I O.
> 
> Old MacDonald had a farm, E I E I O.
> And on that farm he had a horse, E I E I O.
> With a neigh, neigh here and a neigh, neigh there.
> Here a neigh, there a neigh, everywhere a neigh, neigh.
> Old MacDonald had a farm, E I E I O.
> 
> Old MacDonald had a farm, E I E I O.
> And on that farm he had a duck, E I E I O.
> With a quack, quack here and a quack, quack there.
> Here a quack, there a quack, everywhere a quack, quack.
> Old MacDonald had a farm, E I E I O.
> 
> Old MacDonald had a farm, E I E I O.
> And on that farm he had a goose, E I E I O.
> With a honk, honk here and a honk, honk there.
> Here a honk, there a honk, everywhere a honk, honk.
> Old MacDonald had a farm, E I E I O.
> 
> Old MacDonald had a farm, E I E I O.
> And on that farm he had a hen, E I E I O.
> With a cluck, cluck here and a cluck, cluck there.
> Here a cluck, there a cluck, everywhere a cluck, cluck.
> Old MacDonald had a farm, E I E I O.
> 
> Old MacDonald had a farm, E I E I O.
> And on that farm he had a chick, E I E I O.
> With a peep, peep here and a peep, peep there.
> Here a peep, there a peep, everywhere a peep, peep.
> Old MacDonald had a farm, E I E I O.
> 
> Old MacDonald had a farm, E I E I O.
> And on that farm he had a pig, E I E I O.
> With an oink, oink here and an oink, oink there.
> Here an oink, there an oink, everywhere an oink, oink.
> Old MacDonald had a farm, E I E I O.
> 
> Old MacDonald had a farm, E I E I O.
> And on that farm he had a sheep, E I E I O.
> With a baa, baa here and a baa, baa there.
> Here a baa, there a baa, everywhere a baa, baa.
> Old MacDonald had a farm, E I E I O.

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 32 remaining solutions by signing in and submitting your own entry
#33 Eivind Jahren / HaskellElephant - Score: 239 - 02/02/11 @ 14:58
3jlcwooses<Esc>Geas<Esc>:%s/\v(\w+)s (\w+)/And on that farm he had a \1, E I E I O.\rWith a \2, \2 here and a \2, \2 there.\rHere a \2, there a \2, everywhere a \2, \2.\r/g<CR><CR>ggOOld MacDonald had a farm, E I E I O.<Esc>ddqqP4jPjjq7@qdd:%s/a o/an o/g<CR>ZZ

0 comments

#34 thasso / thasso23 - Score: 239 - 11/02/13 @ 12:37
3jlcwooses<Esc>Geas<Esc>:%s/\v(\w+)s (\w+)/And on that farm he had a \1, E I E I O.\rWith a \2, \2 here and a \2, \2 there.\rHere a \2, there a \2, everywhere a \2, \2.\r/g<CR><CR>ggOOld MacDonald had a farm, E I E I O.<Esc>ddqqP4jPjjq7@qdd:%s/a o/an o/g<CR>ZZ

0 comments

#35 yaon / yaon4 - Score: 242 - 09/10/13 @ 13:29
:inoremap - Old MacDonald had a farm<CR>:inoremap = , E I E I O.<CR>3jRgoo<Esc>eas<Esc>Geas<Esc>ggqqi-=<CR>And on that farm he had a <Esc>exi=<CR>With a <Esc>lyw$a, <Esc>pa here and a <Esc>pa, <Esc>pa there.<CR>Here a <Esc>pa, there a <Esc>pa, everywhere a <Esc>pa, <Esc>pa.<CR>-=<CR><Esc>jq7@qdd8kVj:s/a\ /an /g<CR>ZZ

0 comments

#36 Karel Vervaeke / karel1980 - Score: 244 - 01/11/11 @ 14:56
qaIOld MacDonald had a farm<Esc>qqba, E I E I O.<CR><Esc>qqcexbdwiAnd on that farm he had a <C-R>"<BS><Esc>@bdwqqdIWith a <C-R>", <C-R>" here and a <C-R>", <C-R>" there.<CR>Here a <C-R>", there a <C-R>", everywhere a <C-R>", <C-R>".<CR><Esc>@a@bjqqe@a@b@c@dq6@edd:%s/gees/goose<CR>:%s/a o/an o/g<CR>:%s/hee/heep<CR>ZZ

0 comments

#37 Christopher Brew / Seph1rothVII - Score: 247 - 01/11/12 @ 22:46
qqOOld MacDonald had a farm, E I E I O.<Esc>YjpkiAnd on that farm he had a <Esc>ea, E I E I O.<CR><Esc>ywiWith a <Esc>ea, <Esc>p2By2WA here and a <Esc>pa there.<CR>Here a <Esc>pbithere a <Esc>ea, everywhere a <Esc>pa.<Down><CR><Esc>jq7@qdd7k:s/a /an /g<CR>k:s/a /an /g<CR>k8ex6kex6khhx6khroh.6kex6klx6khhxZZ

0 comments

#38 RobertT / techrt2050 - Score: 257 - 10/11/13 @ 00:35
:%s/s / <CR>Mlrol.HqqIOld MacDonald had a farm, E I E I O.<CR>And on that farm he had a <Esc>WWh?,<CR>"ay$``PldwdwoWith a <Esc>pa, <Esc>pa here and a <Esc>pa, <Esc>pa there.<CR>Here a <Esc>pa, there a <Esc>pa, everywhere a <Esc>pa, <Esc>pa.<Esc>3kY``3jpo<Esc>j<Esc>q7@qggjjjjjjjjjj/oink<CR>hin<Esc>3nhin<Esc>3nhin<Esc>faan<Esc>;an<Esc>GddZZ

0 comments

#39 Greg Belote / gbelote - Score: 270 - 08/04/12 @ 14:02
qave"bywVVve"cySOld MacDonald had a farm, E I E I O.<CR>And on that farm he had a <C-R>b, E I E I O.<CR>With a <C-R>c, <C-R>c here and a <C-R>c, <C-R>c there.<CR>Here a <C-R>c, there a <C-R>c, everywhere a <C-R>c, <C-R>c.<CR>Old <C-X><C-L><CR><Esc>jq7@add6kV2k:s/o a/<BS><BS><BS><BS>a o/an o/g<CR>kk8ex6kex6khhx6khcc<Esc>u6lwwwwwwlRoo<Esc>6kex6klx6khhx:wq<CR>

0 comments

#40 Oliver Christ / 0liverChrist - Score: 275 - 10/18/13 @ 21:52
exjexjhxjciwgoose<Esc>jhxjexjhhxggqa"adw"bdwddGoOld MacDonald had a farm, E I E I O.<CR>And on that farm he had a <C-R>a<BS>, E I E I O.<CR>With a <C-R>b, <C-R>b here and a <C-R>b, <C-R>b there.<CR>Here a <C-R>b, there a <C-R>b, everywhere a <C-R>b, <C-R>b.<CR>Old MacDonald had a farm, E I E I O.<CR><Esc>ggq7@aG:39,40s/ a / an /g<CR>GddZZ

0 comments

#41 無ん垢の叫び / john_ababa - Score: 1754 - 02/26/12 @ 11:54
cGOld MacDonald had a farm, E I E I O.<CR>And on that farm he had a cow, E I E I O.<CR>With a moo, moo here and a moo, moo there.<CR>Here a moo, there a moo, everywhere a moo, moo.<CR>Old MacDonald had a farm, E I E I O.<CR><CR>Old MacDonald had a farm, E I E I O.<CR>And on that farm he had a horse, E I E I O.<CR>With a neigh, neigh here and a neigh, neigh there.<CR>Here a neigh, there a neigh, everywhere a neigh, neigh.<CR>Old MacDonald had a farm, E I E I O.<CR><CR>Old MacDonald had a farm, E I E I O.<CR>And on that farm he had a duck, E I E I O.<CR>With a quack, quack here and a quack, quack there.<CR>Here a quack, there a quack, everywhere a quack, quack.<CR>Old MacDonald had a farm, E I E I O.<CR><CR>Old MacDonald had a farm, E I E I O.<CR>And on that farm he had a goose, E I E I O.<CR>With a honk, honk here and a honk, honk there.<CR>Here a honk, there a honk, everywhere a honk, honk.<CR>Old MacDonald had a farm, E I E I O.<CR><CR>Old MacDonald had a farm, E I E I O.<CR>And on that farm he had a hen, E I E I O.<CR>With a cluck, cluck here and a cluck, cluck there.<CR>Here a cluck, there a cluck, everywhere a cluck, cluck.<CR>Old MacDonald had a farm, E I E I O.<CR><CR>Old MacDonald had a farm, E I E I O.<CR>And on that farm he had a chick, E I E I O.<CR>With a peep, peep here and a peep, peep there.<CR>Here a peep, there a peep, everywhere a peep, peep.<CR>Old MacDonald had a farm, E I E I O.<CR><CR>Old MacDonald had a farm, E I E I O.<CR>And on that farm he had a pig, E I E I O.<CR>With an oink, oink here and an oink, oink there.<CR>Here an oink, there an oink, everywhere an oink, oink.<CR>Old MacDonald had a farm, E I E I O.<CR><CR>Old MacDonald had a farm, E I E I O.<CR>And on that farm he had a sheep, E I E I O.<CR>With a baa, baa here and a baa, baa there.<CR>Here a baa, there a baa, everywhere a baa, baa.<CR>Old MacDonald had a farm, E I E I O.<Esc><Esc>ZZ

0 comments

Created by: gumnos

41 active golfers, 89 entries

Leaderboard (lowest score wins):
156
#1 - Victor Ramirez / virako

10/18/2012 at 12:01AM

157
#2 - Urtica dioica / udioica

05/25/2013 at 11:44PM

157
#3 - Petro Тrouq / zulolosi

07/06/2013 at 10:41AM

157
#4 - John Braxler / braxler

10/10/2014 at 06:30PM

162
#5 - Rod Knowlton / codelahoma

05/26/2012 at 11:20AM

163
#6 - Justin Love / wondible

09/02/2011 at 05:41AM

165
#7 - Wei Dai / clvv42

01/14/2011 at 12:24AM

165
#8 - Hu Junfeng / junfeng

08/01/2011 at 08:31AM

170
#9 - h_east (トロッコ6個) / h_east

02/18/2011 at 11:39PM

173
#10 - Federico Galassi / federicogalassi

01/10/2011 at 04:11AM

196
#11 - hiding / I_haveno_name

10/09/2013 at 11:54AM

202
#12 - Stephen Morrow / yawmark

01/26/2011 at 06:51PM

206
#13 - Rob Ciaccio / RobertoCalavera

01/18/2011 at 12:01AM

208
#14 - Richard Wood / richardbwood

01/10/2011 at 05:22PM

208
#15 - Andrew Dorman / andydorman

02/17/2011 at 08:09PM

209
#16 -  Ikhsan Maulana / ixandidu

01/14/2011 at 04:19PM

212
#17 - Pete Johns / johnsyweb

01/09/2011 at 09:47PM

212
#18 - Francisco Dibar / frandibar

01/10/2011 at 02:33AM

213
#19 - Dan Dorman / dandorman

01/18/2011 at 07:52PM

216
#20 - Dave / zzdave13

07/23/2011 at 02:07PM

218
#21 - Renat Aksitov / Korvin79

01/29/2012 at 02:04PM

219
#22 - You-Siang Lin / yslinnctu

12/15/2011 at 05:32AM

220
#23 - William Dunand / wdunand

11/09/2011 at 03:08AM

222
#24 - Steven Occhipinti / steveocchipinti

02/03/2011 at 02:59AM

225
#25 - James / Dronak

09/27/2014 at 05:34PM

228
#26 - mightyfoo / mightyfoo

05/26/2011 at 03:52AM

229
#27 - Clive Evans / swish_bob

01/10/2011 at 10:49PM

229
#28 - Caleb Cornman / calebcornman

04/27/2011 at 01:08AM

230
#29 - Bryan Kam / bryankam

01/11/2011 at 08:28PM

231
#30 - Cameron Jordan / cameronism

01/11/2011 at 06:48PM

234
#31 - dw jdder / dwjdder

01/11/2011 at 04:13PM

234
#32 - Mark Smith-Guerrero / msmithgu

01/11/2011 at 05:15PM

239
#33 - Eivind Jahren / HaskellElephant

02/02/2011 at 02:58PM

239
#34 - thasso / thasso23

11/02/2013 at 12:37PM

242
#35 - yaon / yaon4

09/10/2013 at 01:29PM

244
#36 - Karel Vervaeke / karel1980

01/11/2011 at 02:56PM

247
#37 - Christopher Brew / Seph1rothVII

01/11/2012 at 10:46PM

257
#38 - RobertT / techrt2050

10/11/2013 at 12:35AM

270
#39 - Greg Belote / gbelote

08/04/2012 at 02:02PM

275
#40 - Oliver Christ / 0liverChrist

10/18/2013 at 09:52PM

1754
#41 - 無ん垢の叫び / john_ababa

02/26/2012 at 11:54AM