Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Leaderboard, 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 26 remaining solutions by signing in and submitting your own entry
#27 dw jdder / @dwjdder - Score: 234 - 01/11/11 @ 08:13
:%s:s :_ <CR>ean<Down>_<Esc>4-cwgoose_<Esc>:%s:\(.*\)_\(.*\):)_)And on that farm he had a \1')With a\2,\2 h( and a\2,\2 th(.)H( a\2, th( a\2, everywh( a\2,\2.)_<CR>:%s:_:Old MacDonald had a farm':g|%s:):\r:g|%s:(:ere:g|%s:,n:,:g|%s:':, E I E I O.:|1d|x<CR>

0 comments

#28 Mark Smith-Guerrero / @msmithgu - Score: 234 - 01/11/11 @ 09:15
3jlrol.:%s/s / /<CR>ggqqceOld MacDonald had a farm, E I E I O.<CR>And on that farm he had a <C-R>", E I E I O.<CR>With a <Esc>lyeA, <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>jq7@q:%s/a o/an o/g<CR>3kyy:%s/\n\n/\r<C-R>"\r/<CR>dk<CR>ZZ

0 comments

#29 Eivind Jahren / @HaskellElephant - Score: 239 - 02/02/11 @ 06: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

#30 Karel Vervaeke / @karel1980 - Score: 244 - 01/11/11 @ 06: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

#31 Christopher Brew / @Seph1rothVII - Score: 247 - 01/11/12 @ 14: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

#32 Greg Belote / @gbelote - Score: 270 - 08/04/12 @ 07: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

#33 無ん垢の叫び / @john_ababa - Score: 1754 - 02/26/12 @ 03: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

33 active golfers, 72 entries

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

07/11/2012 at 06:18PM

Dsc_0096_2_normal
156
#2 - Victor Ramirez / @virako

10/17/2012 at 05:01PM

Mobile_photo_mar_15__2010_12_39_49_normal
162
#3 - Rod Knowlton / @codelahoma

05/26/2012 at 04:20AM

Jlove201003sq_normal
163
#4 - Justin Love / @wondible

09/01/2011 at 10:41PM

Me-small_normal
165
#5 - Wei Dai / @clvv42

01/13/2011 at 04:24PM

Avatar-small_normal
165
#6 - Hu Junfeng / @hujunfeng

08/01/2011 at 01:31AM

P1000007_normal
170
#7 - h_east (DDD ready) / @h_east

02/18/2011 at 03:39PM

Fepic_normal
173
#8 - Federico Galassi / @federicogalassi

01/09/2011 at 08:11PM

Gravatar_normal
202
#9 - Stephen Morrow / @yawmark

01/26/2011 at 10:51AM

1309650785306_normal
206
#10 - Rob Ciaccio / @RobertoCalavera

01/17/2011 at 04:01PM

Default_profile_4_normal
208
#11 - Richard Wood / @richardbwood

01/10/2011 at 09:22AM

Alpha-omega-infinity-tattoo_normal
208
#12 - Andrew Dorman / @andydorman

02/17/2011 at 12:09PM

Untitled_2_normal
209
#13 -  Ikhsan Maulana / @ixandidu

01/14/2011 at 08:19AM

Image_normal
212
#14 - Pete Johns / @johnsyweb

01/09/2011 at 01:47PM

Default_profile_6_normal
212
#15 - Francisco Dibar / @frandibar

01/09/2011 at 06:33PM

Dan_in_white_shirt_normal
213
#16 - Dan Dorman / @dandorman

01/18/2011 at 11:52AM

Uwe_horns_by_joao_normal
216
#17 - Dave / @zzdave13

07/23/2011 at 07:07AM

Default_profile_2_normal
218
#18 - Renat Aksitov / @Korvin79

01/29/2012 at 06:04AM

Gintoki_normal
219
#19 - You-Siang Lin / @yslinnctu

12/14/2011 at 09:32PM

Default_profile_6_normal
220
#20 - William Dunand / @wdunand

11/08/2011 at 07:08PM

187559_1578484375_479499_n_normal
222
#21 - Steven Occhipinti / @steveocchipinti

02/02/2011 at 06:59PM

Foo-berk_normal
228
#22 - mightyfoo / @mightyfoo

05/25/2011 at 08:52PM

Eek_normal
229
#23 - Clive Evans / @swish_bob

01/10/2011 at 02:49PM

Caleb_cornman_normal
229
#24 - Caleb Cornman / @calebcornman

04/26/2011 at 06:08PM

Lol_normal
230
#25 - Bryan Kam / @bryankam

01/11/2011 at 12:28PM

Default_profile_4_normal
231
#26 - Cameron Jordan / @cameronism

01/11/2011 at 10:48AM

Default_profile_5_normal
234
#27 - dw jdder / @dwjdder

01/11/2011 at 08:13AM

Bauchi_mask_normal
234
#28 - Mark Smith-Guerrero / @msmithgu

01/11/2011 at 09:15AM

Dude2_normal
239
#29 - Eivind Jahren / @HaskellElephant

02/02/2011 at 06:58AM

Default_profile_5_normal
244
#30 - Karel Vervaeke / @karel1980

01/11/2011 at 06:56AM

Image1326661166_normal
247
#31 - Christopher Brew / @Seph1rothVII

01/11/2012 at 02:46PM

Monocle_normal
270
#32 - Greg Belote / @gbelote

08/04/2012 at 07:02AM

Bc879469f279ee24b7fbdfad7c2216d9_normal
1754
#33 - 無ん垢の叫び / @john_ababa

02/26/2012 at 03:54AM