# Golf: Dehamlizing

**URL:** <https://discuss.kakoune.com/t/golf-dehamlizing/96>\
**Category:** Archives\
**Created:** [October 5, 2018, 11:06am UTC](https://discuss.kakoune.com/t/golf-dehamlizing/96 "2018-10-05T11:06:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TeddyDD](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/teddydd/32/21_2.png) [@TeddyDD](https://discuss.kakoune.com/u/TeddyDD)\
**Post date:** [October 5, 2018, 11:06am UTC](https://discuss.kakoune.com/t/golf-dehamlizing/96/1 "2018-10-05T11:06:12Z")

</div>

[Challange](http://www.vimgolf.com/challenges/5035e5b3838d9e000200006d) `5035e5b3838d9e000200006d` - convert haml to erb

Input

```auto
%tr
  %td= raw("<%= line1_hello %>")
  %td= raw("<%= line2(world) %>")
  %td= raw("<%= line3_hello %>")
  %td= raw("<%= line4 %>")
  %td= raw("<%= line5_(world) %>")

```

Output

```auto
<tr>
  <td><%= line1_hello %></td>
  <td><%= line2(world) %></td>
  <td><%= line3_hello %></td>
  <td><%= line4 %></td>
  <td><%= line5_(world) %></td>
</tr>

```

Vim best: 32

My best so far: 37 with `%s><ret>mdlp<a-f>=dmmQZbi<backspace><lt><esc>a<gt><esc>yza<lt>/<esc>pQ<a-i>i<a-;>q,q`

---

<div class="post-metadata">

**Author:** ![eraserhd](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/eraserhd/32/15_2.png) [@eraserhd](https://discuss.kakoune.com/u/eraserhd)\
**Post date:** [October 8, 2018, 3:13pm UTC](https://discuss.kakoune.com/t/golf-dehamlizing/96/2 "2018-10-08T15:13:51Z")

</div>

I’m at 35: `r<lt>A<gt><esc>%s"<ret>c<lt>td<gt><esc><a-i>by<a-x>_Rbi/<esc><space>o<lt>/tr<gt><esc>,q`

That was pretty hard!

---

<div class="post-metadata">

**Author:** ![TeddyDD](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/teddydd/32/21_2.png) [@TeddyDD](https://discuss.kakoune.com/u/TeddyDD)\
**Post date:** [October 8, 2018, 4:28pm UTC](https://discuss.kakoune.com/t/golf-dehamlizing/96/3 "2018-10-08T16:28:17Z")

</div>

Ooooh clever! Good job 👍
