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 71 remaining solutions by signing in and submitting your own entry
#72 nickGPT / @nickandbro - Score: 99 - 08/28/24 @ 19:58
jqqf%s<<C-C><C-C><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: @corrodedlotus

72 active golfers, 185 entries

Leaderboard (lowest score wins):
40
#31 - Tom Sisk / @TomSisk

11/08/2012 at 08:35PM

40
#32 - Panupan S. / @lionpeal

01/16/2013 at 12:03AM

40
#33 - Trevor Powell / @DoomedBunnies

04/16/2013 at 01:50AM

40
#34 - Cristian Lupașcu / @clupasq

02/26/2016 at 12:09PM

41
#35 - J. Nick Terry / @deft_code

08/28/2012 at 01:57AM

41
#36 - brett / @brettyukich

09/24/2013 at 10:19AM

41
#37 - James / @Dronak

09/24/2014 at 03:16AM

42
#38 - juan patlang / @juanpatlang

08/23/2012 at 09:11AM

42
#39 - Glen / @Glen_S

09/01/2012 at 05:31AM

42
#40 - Stanisław / @Wasiutynski

10/20/2012 at 09:50AM

42
#41 - Danilo / @dbrgn

10/29/2012 at 09:18PM

42
#42 - Underhill Labs / @underhilllabs

11/01/2012 at 04:23AM

42
#43 - Yann Moisan / @YannMoisan

01/04/2013 at 11:56PM

42
#44 - x03n046 / @x03n046

06/01/2022 at 08:15AM

43
#45 - Michael Limiero / @michaellimiero

09/14/2012 at 07:12PM

43
#46 - Woojung Kim 김우중 / @_kimwz

07/16/2013 at 04:40AM

43
#47 - zmf_tim / @zmf_tim

08/31/2013 at 11:54PM

43
#48 - Rathrio / @Rathrio

05/04/2015 at 03:15PM

43
#49 - RockerZZY / @rocker_zzy

08/31/2020 at 12:53PM

43
#50 - Qing Liu / @poeminlash

09/03/2022 at 08:04PM

44
#51 - Martin Petrov / @mgpetrov

08/23/2012 at 12:37PM

45
#52 - Daniel Lundin / @danielundin

08/23/2012 at 03:21PM

45
#53 - Mihai Mazilu / @mtmazilu

08/24/2012 at 03:08PM

45
#54 - Matthew Clair / @CanadaRox

08/27/2012 at 01:31AM

45
#55 - Vasil Sakarov / @vsakarov

09/20/2012 at 09:10AM

45
#56 - cj / @cj01101

02/04/2014 at 11:43PM

46
#57 - shahanavaz m / @shahanavazm

03/26/2024 at 04:55AM

48
#58 - Suvash Thapaliya / @suvash

09/05/2012 at 10:14AM

50
#59 - Peter Etheryte / @Etheryte

09/02/2012 at 11:26PM

52
#60 - Tyler Breisacher / @tbreisacher

08/25/2012 at 07:31AM