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 84 remaining solutions by signing in and submitting your own entry
#85 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

85 active golfers, 388 entries

Leaderboard (lowest score wins):
70
#61 - XiaoXiaoLui / @XiaoXiaoLui1

08/16/2019 at 10:03AM

71
#62 - 黒澤亮二 / @rjkuro

06/01/2019 at 05:44PM

72
#63 - Ymte Jan Broekhuizen / @ymtejan

04/28/2019 at 03:11PM

72
#64 - Sebastien Nicoud / @sebnukem

05/05/2019 at 01:15AM

73
#65 - Kim Hwa Joong / @hanmwoi

05/09/2019 at 01:21PM

73
#66 - mkaminaga / @mkmng3

06/01/2019 at 04:51AM

76
#67 - Bob Ren / @bobrenjc93

08/07/2019 at 05:28PM

79
#68 - tllilleh / @tllilleh

05/15/2019 at 01:19AM

81
#69 - shredded / @shredded

05/01/2019 at 07:47PM

82
#70 - りょ / @ryoo141

05/08/2019 at 01:24PM

86
#71 - Manuel Filz / @f1l2

04/30/2019 at 04:23PM

86
#72 - Andy Balaam / @andybalaam

05/08/2019 at 08:07PM

86
#73 - deHman89 / @danho89

06/21/2019 at 08:05AM

89
#74 - Floyd Gantt / @fgantt

07/19/2019 at 08:42PM

92
#75 - Alexánder Caba / @CabaAlexander

05/02/2019 at 07:00PM

94
#76 - yipcyj / @yipcyj

05/01/2019 at 01:04PM

98
#77 - James Stidard / @JamesStidard

05/03/2019 at 06:33PM

98
#78 - James Raubenheimer / @jamzrob

08/06/2019 at 09:00PM

104
#79 - Vim Golfer / @VimGolfer6

07/16/2019 at 11:55AM

107
#80 - Budi Sentosa / @budisentosa

04/29/2019 at 01:01PM

116
#81 - 김현수 / @flyhigh43

04/27/2019 at 04:27PM

126
#82 - David McDonald / @dmcdona

05/15/2019 at 08:35AM

127
#83 - Lingyu Yi / @LgxLingyu

05/08/2019 at 06:03AM

131
#84 - Matthias Kausl / @sig_segv

04/26/2019 at 03:15PM

158
#85 - ippachi / @ippachi1218

05/07/2019 at 03:36PM