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

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 73 remaining solutions by signing in and submitting your own entry
#74 ippachi / @ippachi1218 - Score: 158 - 05/07/19 @ 15:36
lciwtable<Esc><Esc>jjjjjjhhh.khhhhh:sp<BS>/p>/td/<BS>>/g<CR>n.nu:s<CR>n:s<CR>n:s<CR>n:s<CR>n:s<CR>n:s<CR>kkO<BS><tr><CR><tr<BS><BS>/tr><Esc>khhh<C-V>jI  <Esc>jjVjdkkpVj<Esc><Esc>k<C-V>jI4 <BS><BS>    <Esc><Esc>jkkyyjjjpkyyjjjpkkhh<C-V>jI    <Esc><Esc>:wq<CR>

0 comments


Created by: @sig_segv

74 active golfers, 343 entries

Leaderboard (lowest score wins):
55
#31 - Correct Battery Horse / @horse_battery

04/27/2019 at 08:13PM

55
#32 - Roger Bongers / @RogerBongers

04/28/2019 at 04:07AM

55
#33 - Quinn Collins / @Quinn00239061

05/06/2019 at 06:15PM

57
#34 - ゴリラ / @gorilla0513

05/04/2019 at 08:55AM

57
#35 - vimgolfer24271 / @vimgolfer24271

05/14/2019 at 06:55AM

57
#36 - Erik Lindeborg / @ErikLindeborg

06/08/2019 at 03:45PM

57
#37 - Johannes / @joka253

06/21/2019 at 08:25AM

58
#38 - BaffaloP 🐃🎨 / @bbaffalopp

04/27/2019 at 10:59AM

58
#39 - albalitz / @_albalitz

06/21/2019 at 08:15AM

59
#40 - william cedervall / @Master_smily

05/13/2019 at 01:54PM

59
#41 - Elcio Ferreira / @elcio

05/15/2019 at 12:22AM

59
#42 - Jonáš Šerých / @serycjon

06/03/2019 at 04:07PM

61
#43 - Jairo Suarez / @xyos

05/08/2019 at 03:38PM

61
#44 - Nolen Royalty / @NolenRoyalty

05/09/2019 at 03:55AM

64
#45 - rg thomas / @rgt47

04/26/2019 at 10:30PM

64
#46 - ui / @ui61065627

05/01/2019 at 02:31AM

65
#47 - Peter Demin / @peterdemin

07/12/2019 at 08:11PM

68
#48 - Kasper Siig / @knsiig

05/07/2019 at 04:42PM

69
#49 - 이종혁 / @BluePaisa

05/03/2019 at 11:20AM

69
#50 - Nils Moehrle / @MoehrleNils

05/06/2019 at 08:27PM

69
#51 - Ricardo / @log2tweet

05/08/2019 at 08:04PM

70
#52 - Kai.Li / @KaiLi19

04/28/2019 at 12:23AM

71
#53 - 黒澤亮二 / @rjkuro

06/01/2019 at 05:44PM

72
#54 - Ymte Jan Broekhuizen / @ymtejan

04/28/2019 at 03:11PM

72
#55 - Sebastien Nicoud / @sebnukem

05/05/2019 at 01:15AM

73
#56 - Kim Hwa Joong / @hanmwoi

05/09/2019 at 01:21PM

73
#57 - mkaminaga / @mkmng3

06/01/2019 at 04:51AM

79
#58 - tllilleh / @tllilleh

05/15/2019 at 01:19AM

81
#59 - shredded / @shredded

05/01/2019 at 07:47PM

82
#60 - りょ / @ryoo141

05/08/2019 at 01:24PM