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):
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

32
#6 - Arya Kumar / @SusSquirrel

05/26/2021 at 11:18PM

32
#7 - Peppa Pig / @PeppaPi95550250

07/03/2024 at 06:49AM

34
#8 - Conner McDaniel / @connermcd

08/24/2012 at 07:21PM

34
#9 - mevmev / @mevmev8

09/08/2021 at 08:59PM

35
#10 - Justin Love / @wondible

08/26/2012 at 03:50AM

35
#11 - Vimeo Tossitaouta / @VimeoT

09/04/2012 at 02:06AM

36
#12 - Joonas Pihlajamaa / @jokkebk

03/14/2014 at 05:18PM

37
#13 - Tesnorth / @Tesnorth

08/23/2012 at 03:27PM

37
#14 - wes / @_weslly

08/23/2012 at 04:53PM

37
#15 - deigen / @deigen0

08/29/2012 at 08:29AM

37
#16 - while0pass / @while0pass

08/31/2012 at 03:18AM

37
#17 - BostX / @BostX

09/06/2012 at 03:01PM

37
#18 - じょんあば / @john_ababa

09/16/2012 at 10:24AM

37
#19 - Édouard M'tou / @DouardM

10/08/2012 at 09:45PM

37
#20 - Chasetopher / @chasetopherlee

11/02/2012 at 05:15AM

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

08/23/2012 at 08:51AM

38
#22 - vansan / @VinceVansan

08/23/2012 at 10:49AM

38
#23 - Aaron Hall / @aarontothemax

08/24/2012 at 03:27AM

38
#24 - Chris Brown / @engineercyb

08/24/2012 at 03:22PM

38
#25 - Sune Simonsen / @sunesimonsen

08/25/2012 at 08:42PM

38
#26 - Matt Robbins / @mcrmfc

11/25/2014 at 06:07PM

39
#27 - Marcin Szamotulski / @me_coot

11/03/2012 at 02:21PM

39
#28 - Tyler / @tylerbindon

04/06/2013 at 04:22AM

39
#29 - Mauro Persano / @fzort

11/20/2014 at 10:30AM

39
#30 - POSIX / @po6ix

02/02/2022 at 01:52PM