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 61 remaining solutions by signing in and submitting your own entry
#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: @corrodedlotus

62 active golfers, 155 entries

Leaderboard (lowest score wins):
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 - Eumir Gaspar / @corrodedlotus

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 - Dominick 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