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

Word Blender

The insides of long words seem to have been run through the blender. Can you fix this famous tale, brave knight?

Start file
             A CUCITCENNOT YEKNAE IN KNIG
                    AUHTRR'S CRUOT

IT was in Wciwrak Cltsae taht I cmae asorcs the
cuoirus segnartr wohm I am gniog to tlak auobt.
He aetcarttd me by terhe tgnihs: his cidnad sticilpmiy,
his muolevras ftirailimay wtih aneicnt aomrr, and the
rsenluftses of his cnapmoy -- for he did all the tniklag.
We flel tehtegor, as msedot plpoee wlil, in the tial of
the hred taht was bnieg swohn tguorhh, and he at ocne
bagen to say tgnihs wcihh ietseretnd me. As he
teklad anolg, sltfoy, pltnasaely, flgniwoly, he semeed
to dfirt aawy ilbitpecrepmy out of tihs wlrod and tmie,
and itno smoe rtomee era and old fettogron crtnuoy;
and so he gllaudary wvoe scuh a slepl auobt me taht I
semeed to mvoe anomg the sretceps and swodahs and
dsut and mlod of a gary atiuqitny, hnidlog sceeph wtih
a rilec of it! Eltcaxy as I wluod saepk of my nseraet
panosrel fdneirs or eeimens, or my msot failimar
nrobhgies, he skope of Sir Brevidee, Sir Bros de
Ginas, Sir Lolecnuat of the Lkae, Sir Gahalad, and all
the oehtr gaert nemas of the Tlbae Rnuod -- and how
old, old, ulbakaepsny old and fedad and dry and
mtsuy and aneicnt he cmae to look as he wnet on!
Pltnesery he tenrud to me and siad, jsut as one mhgit
saepk of the wehtaer, or any oehtr common mettar.
End file
             A CONNECTICUT YANKEE IN KING
                    ARTHUR'S COURT

IT was in Warwick Castle that I came across the
curious stranger whom I am going to talk about.
He attracted me by three things: his candid simplicity,
his marvelous familiarity with ancient armor, and the
restfulness of his company -- for he did all the talking.
We fell together, as modest people will, in the tail of
the herd that was being shown through, and he at once
began to say things which interested me. As he
talked along, softly, pleasantly, flowingly, he seemed
to drift away imperceptibly out of this world and time,
and into some remote era and old forgotten country;
and so he gradually wove such a spell about me that I
seemed to move among the specters and shadows and
dust and mold of a gray antiquity, holding speech with
a relic of it! Exactly as I would speak of my nearest
personal friends or enemies, or my most familiar
neighbors, he spoke of Sir Bedivere, Sir Bors de
Ganis, Sir Launcelot of the Lake, Sir Galahad, and all
the other great names of the Table Round -- and how
old, old, unspeakably old and faded and dry and
musty and ancient he came to look as he went on!
Presently he turned to me and said, just as one might
speak of the weather, or any other common matter.

View Diff

1,2c1,2
<              A CUCITCENNOT YEKNAE IN KNIG
<                     AUHTRR'S CRUOT
---
>              A CONNECTICUT YANKEE IN KING
>                     ARTHUR'S COURT
4,26c4,26
< IT was in Wciwrak Cltsae taht I cmae asorcs the
< cuoirus segnartr wohm I am gniog to tlak auobt.
< He aetcarttd me by terhe tgnihs: his cidnad sticilpmiy,
< his muolevras ftirailimay wtih aneicnt aomrr, and the
< rsenluftses of his cnapmoy -- for he did all the tniklag.
< We flel tehtegor, as msedot plpoee wlil, in the tial of
< the hred taht was bnieg swohn tguorhh, and he at ocne
< bagen to say tgnihs wcihh ietseretnd me. As he
< teklad anolg, sltfoy, pltnasaely, flgniwoly, he semeed
< to dfirt aawy ilbitpecrepmy out of tihs wlrod and tmie,
< and itno smoe rtomee era and old fettogron crtnuoy;
< and so he gllaudary wvoe scuh a slepl auobt me taht I
< semeed to mvoe anomg the sretceps and swodahs and
< dsut and mlod of a gary atiuqitny, hnidlog sceeph wtih
< a rilec of it! Eltcaxy as I wluod saepk of my nseraet
< panosrel fdneirs or eeimens, or my msot failimar
< nrobhgies, he skope of Sir Brevidee, Sir Bros de
< Ginas, Sir Lolecnuat of the Lkae, Sir Gahalad, and all
< the oehtr gaert nemas of the Tlbae Rnuod -- and how
< old, old, ulbakaepsny old and fedad and dry and
< mtsuy and aneicnt he cmae to look as he wnet on!
< Pltnesery he tenrud to me and siad, jsut as one mhgit
< saepk of the wehtaer, or any oehtr common mettar.
---
> IT was in Warwick Castle that I came across the
> curious stranger whom I am going to talk about.
> He attracted me by three things: his candid simplicity,
> his marvelous familiarity with ancient armor, and the
> restfulness of his company -- for he did all the talking.
> We fell together, as modest people will, in the tail of
> the herd that was being shown through, and he at once
> began to say things which interested me. As he
> talked along, softly, pleasantly, flowingly, he seemed
> to drift away imperceptibly out of this world and time,
> and into some remote era and old forgotten country;
> and so he gradually wove such a spell about me that I
> seemed to move among the specters and shadows and
> dust and mold of a gray antiquity, holding speech with
> a relic of it! Exactly as I would speak of my nearest
> personal friends or enemies, or my most familiar
> neighbors, he spoke of Sir Bedivere, Sir Bors de
> Ganis, Sir Launcelot of the Lake, Sir Galahad, and all
> the other great names of the Table Round -- and how
> old, old, unspeakably old and faded and dry and
> musty and ancient he came to look as he went on!
> Presently he turned to me and said, just as one might
> speak of the weather, or any other common matter.

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 34 remaining solutions by signing in and submitting your own entry
#35 Dave / @zzdave13 - Score: 71 - 07/24/11 @ 15:15
:%s/\v\w\zs(\w+)\ze\w/\=join(reverse(split(submatch(1),'\zs')),'')/g<NL>ZZ

0 comments

#36 Gabriel Barta / @gbarta - Score: 71 - 12/03/11 @ 04:28
:%s/\w\zs\(\w*\)\ze\w/\=join(reverse(split(submatch(1),'\zs')),'')/g<CR>ZZ

@gbarta: Frustrating to google about VIM rtl support and then find out it wasn't compiled into my copy :/

1 comment

#37 Edwin Merkled / @emacs_viper - Score: 75 - 01/05/11 @ 15:32
:%s/\v\w\zs\<BS>(\w+)\ze\w/\=join(reverse(split(subma<BS>atch(0),'\zs')),'')/g<CR>ZZ

0 comments

#38 Tim Chase / @gumnos - Score: 87 - 01/05/11 @ 07:57
:%s/\v(\w)(\w{2,})(\w)/\=submatch(1).join(reverse(split(<C-F>Asu<C-P>(2),'\zs')),'').s<C-P>(3)/g<CR>ZZ

@gumnos: This is (more-or-less) what I used to make the challenge.

1 comment

#39 Gavin Gilmour / @vesech - Score: 93 - 01/05/11 @ 08:49
:%s/\v(\w)(\w+)(\w)/\=submatch(1).join(reverse(split(submatch(2),'\zs')),'').submatch(3)/g<CR>ZZ

0 comments

#40 Dan Dorman / @dandorman - Score: 93 - 01/05/11 @ 14:52
:%s/\v(\w)(\w+)(\w)/\=submatch(1).join(reverse(split(submatch(2),'\zs')),'').submatch(3)/g<CR>ZZ

0 comments

#41 Kylan Robinson / @kylan - Score: 98 - 01/09/11 @ 12:12
:%s/\(\w\)\(\w*\)\(\w\)/\=submatch(1).join(reverse(split(submatch(2),'\zs')),'').submatch(3)/g<CR>ZZZ

0 comments

#42 Mark Reed / @markjreed - Score: 99 - 10/22/11 @ 16:16
:%s/\(\w\)\(\w\+\)\(\w\)/\=submatch(1).join(reverse(split(submatch(2),'\zs')),'').submatch(3)/g<CR>:x<CR>

0 comments

#43 無ん垢の叫び / @john_ababa - Score: 1291 - 02/25/12 @ 23:51
dG:a!<CR>             A CONNECTICUT YANKEE IN KING<CR>                    ARTHUR'S COURT<CR><CR>IT was in Warwick Castle that I came across the<CR>curious stranger whom I am going to talk about.<CR>He attracted me by three things: his candid simplicity,<CR>his marvelous familiarity with ancient armor, and the<CR>restfulness of his company -- for he did all the talking.<CR>We fell together, as modest people will, in the tail of<CR>the herd that was being shown through, and he at once<CR>began to say things which interested me. As he<CR>talked along, softly, pleasantly, flowingly, he seemed<CR>to drift away imperceptibly out of this world and time,<CR>and into some remote era and old forgotten country;<CR>and so he gradually wove such a spell about me that I<CR>seemed to move among the specters and shadows and<CR>dust and mold of a gray antiquity, holding speech with<CR>a relic of it! Exactly as I would speak of my nearest<CR>personal friends or enemies, or my most familiar<CR>neighbors, he spoke of Sir Bedivere, Sir Bors de<CR>Ganis, Sir Launcelot of the Lake, Sir Galahad, and all<CR>the other great names of the Table Round -- and how<CR>old, old, unspeakably old and faded and dry and<CR>musty and ancient he came to look as he went on!<CR>Presently he turned to me and said, just as one might<CR>speak of the weather, or any other common matter.<CR><Esc><Esc>ZZ

0 comments

Created by: @gumnos

43 active golfers, 93 entries

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

07/04/2012 at 10:35AM

Dom-50_normal
30
#2 - dominique pellé / @vimgolfisto

01/07/2011 at 11:30AM

Fepic_normal
33
#3 - Federico Galassi / @federicogalassi

01/07/2011 at 09:26AM

Default_profile_6_normal
34
#4 - derp derp / @derp__

01/05/2011 at 09:29AM

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

01/06/2011 at 06:28PM

The-milky-way-mardi-khola-007_normal
34
#6 - Ujjwol Lamichhane / @Ujjwol

01/07/2011 at 02:52AM

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

02/06/2011 at 12:16AM

Default_profile_1_normal
34
#8 - Paweu1kZ nbNeyIhH / @yUQlwsFpRSzxJFh

03/16/2011 at 12:13AM

Avatar-small_normal
34
#9 - Hu Junfeng / @hujunfeng

07/29/2011 at 08:17AM

Jlove201003sq_normal
34
#10 - Justin Love / @wondible

08/23/2011 at 07:21AM

Gintoki_normal
34
#11 - You-Siang Lin / @yslinnctu

12/01/2011 at 02:00AM

Default_profile_2_normal
34
#12 - Renat Aksitov / @Korvin79

02/18/2012 at 03:19AM

Adept_normal
35
#13 - Balkoth / @_Balkoth_

01/05/2011 at 09:58AM

Default_profile_2_normal
35
#14 - Victor Vaile / @victorv4_

01/05/2011 at 07:34PM

Gravatar_normal
35
#15 - Stephen Morrow / @yawmark

01/05/2011 at 08:13PM

Darth_lemming_normal
35
#16 - lemming / @darthlemming

01/19/2011 at 11:22PM

4654945923_eb2c60ee5f_normal
35
#17 - Kerson Hsiao / @KersonHsiao

08/02/2012 at 02:10AM

Default_profile_5_normal
36
#18 - Gael / @darkael2

01/06/2011 at 04:13AM

Avatar_normal
36
#19 - Øystein Walle / @oysteinwalle

07/09/2011 at 08:03AM

Default_profile_6_normal
38
#20 - Francisco Dibar / @frandibar

01/11/2011 at 08:45PM

Thedward-gimped-out_normal
40
#21 - Thedward the Edward / @thedward

01/11/2011 at 10:18AM

Default_profile_0_normal
41
#22 - Mattiassich Ákos / @mattiassicha

01/05/2011 at 08:42AM

Gravatar_normal
47
#23 - Asmund Liseth / @Asmund_L

01/06/2011 at 12:44PM

E55df1cc7d5fdb4ae9bc2afcb9afe7e4_normal
50
#24 - matthewd / @_matthewd

01/05/2011 at 07:56AM

Untitled_normal
50
#25 - vg / @vimgolfer

03/02/2011 at 08:08AM

Default_profile_5_normal
57
#26 - Karel Vervaeke / @karel1980

01/06/2011 at 01:12AM

Default_profile_6_normal
67
#27 - William Dunand / @wdunand

11/16/2011 at 01:30AM

Bunnies_normal
67
#28 - Trevor Powell / @DoomedBunnies

12/08/2011 at 07:05PM

Israel_normal
68
#29 - Israel Chauca F. / @Raimondi

01/05/2011 at 05:32PM

Image_normal
69
#30 - Pete Johns / @johnsyweb

01/05/2011 at 12:55PM

Eek_normal
69
#31 - Clive Evans / @swish_bob

01/17/2011 at 02:54PM

N1353060027_30013425_5720_normal
71
#32 - Jordan Lewis / @JordanALewis

01/06/2011 at 01:06PM

45072b62-96bd-47e0-bb3a-83ec72a6e2af_normal
71
#33 - aimee / @sermoa

01/08/2011 at 04:43AM

29ed1f20888463b3b72bd9fed88a79b8_normal
71
#34 - drio / @drio

01/17/2011 at 06:00AM

Uwe_horns_by_joao_normal
71
#35 - Dave / @zzdave13

07/24/2011 at 03:15PM

Zia_normal
71
#36 - Gabriel Barta / @gbarta

12/03/2011 at 04:28AM

Default_profile_1_normal
75
#37 - Edwin Merkled / @emacs_viper

01/05/2011 at 03:32PM

T_e_normal
87
#38 - Tim Chase / @gumnos

01/05/2011 at 07:57AM

2010-08-28_at_11-49-48_normal
93
#39 - Gavin Gilmour / @vesech

01/05/2011 at 08:49AM

Dan_in_white_shirt_normal
93
#40 - Dan Dorman / @dandorman

01/05/2011 at 02:52PM

712250313_701ef30b73_s_normal
98
#41 - Kylan Robinson / @kylan

01/09/2011 at 12:12PM

Headshot_normal
99
#42 - Mark Reed / @markjreed

10/22/2011 at 04:16PM

Bc879469f279ee24b7fbdfad7c2216d9_normal
1291
#43 - 無ん垢の叫び / @john_ababa

02/25/2012 at 11:51PM