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 5cc31feaffd607000ccf6ea7

html paragraph to table

reformat html paragraph to table

Start file
<div>
<p>task 1</p>
<p>description here ....</p>
<p>task 2</p>
<p>some other description here ....</p>
</div>
End file
<table>
  <tr>
    <td>task 1</td>
    <td>description here ....</td>
  </tr>
  <tr>
    <td>task 2</td>
    <td>some other description here ....</td>
  </tr>
</table>

View Diff

1,6c1,10
< <div>
< <p>task 1</p>
< <p>description here ....</p>
< <p>task 2</p>
< <p>some other description here ....</p>
< </div>
---
> <table>
>   <tr>
>     <td>task 1</td>
>     <td>description here ....</td>
>   </tr>
>   <tr>
>     <td>task 2</td>
>     <td>some other description here ....</td>
>   </tr>
> </table>

Solutions by @peterdemin:

Unlock 1 remaining solutions by signing in and submitting your own entry
Created by: @sig_segv

123 active golfers, 590 entries

Solutions by @peterdemin:
65
#83 - Peter Demin / @peterdemin

07/12/2019 at 08:11PM