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):
53
#61 - Eric Potter / @pottereric

05/29/2013 at 01:09PM

55
#62 - Eumir Gaspar / @corrodedlotus

08/23/2012 at 08:25AM

55
#63 - Domon / @Domon

09/12/2012 at 02:10AM

56
#64 - captain_morgan / @captain_morgan

08/23/2012 at 11:14AM

56
#65 - dennis / @nagolove

05/21/2024 at 12:28PM

60
#66 - Dominick LoBraico / @pygatea

12/11/2012 at 11:09PM

64
#67 - Chaos / @gbchaosmaster

08/26/2012 at 10:16PM

64
#68 - Heath Ritchie / @heathritchie

11/13/2012 at 10:46PM

68
#69 - Son of Bongo / @bpcode

08/24/2012 at 04:14PM

96
#70 - Andy L / @akleak

10/16/2012 at 01:03PM

97
#71 - Victor Haffreingue / @nobe_4

08/06/2015 at 07:24PM

99
#72 - nickGPT / @nickandbro

08/28/2024 at 07:58PM