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 5035e5b3838d9e000200006d

Dehamlizing

Change this piece of HAML code back into erb

Start file
%tr
  %td= raw("<%= line1_hello %>")
  %td= raw("<%= line2(world) %>")
  %td= raw("<%= line3_hello %>")
  %td= raw("<%= line4 %>")
  %td= raw("<%= line5_(world) %>")
End file
<tr>
  <td><%= line1_hello %></td>
  <td><%= line2(world) %></td>
  <td><%= line3_hello %></td>
  <td><%= line4 %></td>
  <td><%= line5_(world) %></td>
</tr>

View Diff

1,6c1,7
< %tr
<   %td= raw("<%= line1_hello %>")
<   %td= raw("<%= line2(world) %>")
<   %td= raw("<%= line3_hello %>")
<   %td= raw("<%= line4 %>")
<   %td= raw("<%= line5_(world) %>")
---
> <tr>
>   <td><%= line1_hello %></td>
>   <td><%= line2(world) %></td>
>   <td><%= line3_hello %></td>
>   <td><%= line4 %></td>
>   <td><%= line5_(world) %></td>
> </tr>

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 49 remaining solutions by signing in and submitting your own entry
#50 Suvash Thapaliya / suvash - Score: 48 - 09/05/12 @ 10:14
r<A><Esc>j0qqwr<f=ct<><Esc>f"c$</td><Esc>j0q4@qo<BS><BS></tr><Esc>:wq<CR>

0 comments

#51 Peter Etheryte / Etheryte - Score: 50 - 09/02/12 @ 23:26
:%s:%\(..\).\{,7}:<\1>:|%s:"):</td>:<CR>AA<CR><BS><BS></tr><Esc>ZZ

0 comments

#52 Tyler Breisacher / tbreisacher - Score: 52 - 08/25/12 @ 07:31
:%s-%td= raw("\(.*\)")-<td>\1</td>-<CR>{r<A><Esc>yyGpli/<Esc>ZZ

0 comments

#53 Eric Potter / pottereric - Score: 53 - 05/29/13 @ 13:09
R<tr><Esc>:%s/%td= raw("/<td><CR>:%s/")/<\/td><CR>o<BS><BS></tx<BS>r><Esc>ZZ

0 comments

#54 Benjo Batumbakal / benjobatumbakal - Score: 55 - 08/23/12 @ 08:25
r<A><Esc>yyGpa/<Esc><Up><Right><C-V>4kr<3l<C-V>4jr>l<C-V>5l4jxgv$A</td><Esc>:%s/")//g<CR>ZZ

0 comments

#55 Domon / Domon - Score: 55 - 09/12/12 @ 02:10
r<A><Esc>:%s/%td= raw("/<td>/g<CR>:%s/")/<\/td>/g<CR>o</tr><Esc>0xxZZ

0 comments

#56 captain_morgan / captain_morgan - Score: 56 - 08/23/12 @ 11:14
:%s/%\(..\).\?\(.*\(<.*\)..\)\?/<\1>\3<\/\1><CR>gg4lDGo<Esc>pZZ

0 comments

#57 DJ LoBraico / pygatea - Score: 60 - 12/11/12 @ 23:09
yyGp2Gf=<C-V>4jf"cw<BS>><Esc>qqf"cw</td><Esc>0jq4@q:%s/%/\<<CR>a/<Esc>A><Esc>ggA><Esc>:wq<CR>

0 comments

#58 Chaos / gbchaosmaster - Score: 64 - 08/26/12 @ 22:16
r<A><Esc>Go<BS><BS></tr><Esc>;:%s/%td= raw("/<td><CR>:%s/")/</td><CR>;:<Up><Left><Left><Left><Left><Left><Right>\<CR>:wq<CR>

0 comments

#59 Heath Ritchie / heathritchie - Score: 64 - 11/13/12 @ 22:46
q/<Esc><Esc><Esc><Esc><Esc>:q<CR>q::q<CR>r<ea><Esc>qqj03xi  <<Esc>ea><Esc>l7xf"c$</td><Esc>q4@qo</tr><Esc><<ZZ

0 comments

#60 Son of Bongo / bpcode - Score: 68 - 08/24/12 @ 16:14
:%s/= raw("/<<CR>u:<Up><BS>><CR>:%s/%t/<t<CR>ggA><Esc>yyGpa/<Esc>:%s/'<BS>")/</td><CR>:<Up><Left><Left><Left><Left>\<End><CR>ZZ

0 comments

#61 Andy L / akleak - Score: 96 - 10/16/12 @ 13:03
C<tr><Esc>:%s/%t/<t/g<BS>g<CR>:<Up><BS><BS><BS><BS><BS><BS><BS>= raw("/>/g<CR>kkkkf"C</td><Esc>j0.u;.j<BS>./"<Esc>C<Esc>u/"<CR>C</td><Esc>n.o</tr><Esc>0xx:wqa<CR>

0 comments

#62 Victor Haffreingue / nobe_4 - Score: 97 - 08/06/15 @ 19:24
jqqf%s<<C-C><C-C>f=ct"><Esc>c<Right>><C-C><C-C>lxf"c$</td><C-C><C-C>j0q4@qo<BS><BS></tr><C-C><C-C>ggs<<C-O><C-O><C-O><C-O><C-O><C-O><C-O><C-O><C-O><C-O><C-O><C-O><C-O><C-O><C-O><C-O><C-O><C-O><Esc>cgguu<Esc>uki<Right><Left><C-O>w<C-O>0<C-O>$>C<BS><C-C><C-C>ZZ

0 comments

Created by: benjobatumbakal

62 active golfers, 155 entries

Leaderboard (lowest score wins):
32
#1 - Kerson Hsiao / KersonHsiao

08/24/2012 at 04:06AM

32
#2 - Urtica dioica / udioica

08/24/2012 at 04:59AM

32
#3 - Victor Ramirez / virako

10/15/2012 at 09:53AM

32
#4 - John Braxler / braxler

05/23/2014 at 03:27PM

32
#5 - Petro Тrouq / zulolosi

01/03/2015 at 11:47AM

34
#6 - Conner McDaniel / connermcd

08/24/2012 at 07:21PM

35
#7 - Justin Love / wondible

08/26/2012 at 03:50AM

35
#8 - Vimeo Tossitaouta / VimeoT

09/04/2012 at 02:06AM

36
#9 - Joonas Pihlajamaa / jokkebk

03/14/2014 at 05:18PM

37
#10 - Tesnorth / Tesnorth

08/23/2012 at 03:27PM

37
#11 - wes / _weslly

08/23/2012 at 04:53PM

37
#12 - deigen / deigen0

08/29/2012 at 08:29AM

37
#13 - while0pass / while0pass

08/31/2012 at 03:18AM

37
#14 - BostX / BostX

09/06/2012 at 03:01PM

37
#15 - 無ん垢の叫び / john_ababa

09/16/2012 at 10:24AM

37
#16 - Édouard M'tou / DouardM

10/08/2012 at 09:45PM

37
#17 - Chasetopher / chasetopherlee

11/02/2012 at 05:15AM

38
#18 - h_east (トロッコ6個) / h_east

08/23/2012 at 08:51AM

38
#19 - vansan / VinceVansan

08/23/2012 at 10:49AM

38
#20 - Aaron Hall / aarontothemax

08/24/2012 at 03:27AM

38
#21 - Chris Brown / engineercyb

08/24/2012 at 03:22PM

38
#22 - Sune Simonsen / sunesimonsen

08/25/2012 at 08:42PM

38
#23 - Matt Robbins / mcrmfc

11/25/2014 at 06:07PM

39
#24 - Marcin Sza / coot_

11/03/2012 at 02:21PM

39
#25 - Tyler / tylerbindon

04/06/2013 at 04:22AM

39
#26 - Mauro Persano / fzort

11/20/2014 at 10:30AM

40
#27 - Tom Sisk / TomSisk

11/08/2012 at 08:35PM

40
#28 - Panupan S. / lionpeal

01/16/2013 at 12:03AM

40
#29 - Trevor Powell / DoomedBunnies

04/16/2013 at 01:50AM

40
#30 - Cristian Lupașcu / clupasq

02/26/2016 at 12:09PM

41
#31 - J. Nick Terry / deft_code

08/28/2012 at 01:57AM

41
#32 - brett / brettyukich

09/24/2013 at 10:19AM

41
#33 - James / Dronak

09/24/2014 at 03:16AM

42
#34 - juan patlang / juanpatlang

08/23/2012 at 09:11AM

42
#35 - Glen / Glen_S

09/01/2012 at 05:31AM

42
#36 - Stanisław / Wasiutynski

10/20/2012 at 09:50AM

42
#37 - Danilo / dbrgn

10/29/2012 at 09:18PM

42
#38 - Underhill Labs / underhilllabs

11/01/2012 at 04:23AM

42
#39 - Yann Moisan / YannMoisan

01/04/2013 at 11:56PM

43
#40 - Michael Limiero / michaellimiero

09/14/2012 at 07:12PM

43
#41 - Woojung Kim 김우중 / _kimwz

07/16/2013 at 04:40AM

43
#42 - Timothée Gauthier / zmf_tim

08/31/2013 at 11:54PM

43
#43 - Rathrio / Rathrio

05/04/2015 at 03:15PM

44
#44 - Martin Petrov / mgpetrov

08/23/2012 at 12:37PM

45
#45 - Daniel Lundin / danielundin

08/23/2012 at 03:21PM

45
#46 - Mihai Mazilu / mtmazilu

08/24/2012 at 03:08PM

45
#47 - Matthew Clair / CanadaRox

08/27/2012 at 01:31AM

45
#48 - Vasil Sakarov / vsakarov

09/20/2012 at 09:10AM

45
#49 - cj / cj01101

02/04/2014 at 11:43PM

48
#50 - Suvash Thapaliya / suvash

09/05/2012 at 10:14AM

50
#51 - Peter Etheryte / Etheryte

09/02/2012 at 11:26PM

52
#52 - Tyler Breisacher / tbreisacher

08/25/2012 at 07:31AM

53
#53 - Eric Potter / pottereric

05/29/2013 at 01:09PM

55
#54 - Benjo Batumbakal / benjobatumbakal

08/23/2012 at 08:25AM

55
#55 - Domon / Domon

09/12/2012 at 02:10AM

56
#56 - captain_morgan / captain_morgan

08/23/2012 at 11:14AM

60
#57 - DJ LoBraico / pygatea

12/11/2012 at 11:09PM

64
#58 - Chaos / gbchaosmaster

08/26/2012 at 10:16PM

64
#59 - Heath Ritchie / heathritchie

11/13/2012 at 10:46PM

68
#60 - Son of Bongo / bpcode

08/24/2012 at 04:14PM

96
#61 - Andy L / akleak

10/16/2012 at 01:03PM

97
#62 - Victor Haffreingue / nobe_4

08/06/2015 at 07:24PM