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

98 active golfers, 451 entries

Leaderboard (lowest score wins):
7
#1 - Bruce.Z.Lee / @cvilo4ZLK3OD9WG

06/21/2019 at 01:19AM

7
#2 - Lei Kin / @kireinasorakin

11/14/2019 at 05:04AM

48
#3 - Ítalo Vieira / @italoviieira

05/04/2019 at 02:20AM

48
#4 - jyuxian / @jyuxian

05/04/2019 at 09:23AM

48
#5 - Saki Gw / @Sakigw

05/04/2019 at 01:57PM

48
#6 - John Braxler / @braxler

05/06/2019 at 01:57PM

48
#7 - heppen / @heppen_He

05/11/2019 at 09:45AM

48
#8 - Tosiaki / @Tosiaki1

05/15/2019 at 01:16AM

48
#9 - Smylers / @Smylers2

05/21/2019 at 08:27PM

48
#10 - Miłosz Łakomy / @foobar01123

05/25/2019 at 08:05AM

48
#11 - Tim Dean / @Tmdean

06/06/2019 at 05:26PM

48
#12 - Joe Fahnestock🌵 / @Joecupojoe

07/25/2019 at 07:40PM

48
#13 - Martin Delille / @martinodelilo

08/20/2019 at 02:40PM

48
#14 - Viktor Styrud / @Visklol

10/02/2019 at 10:13AM

49
#15 - james_bunch / @james_bunch

04/28/2019 at 07:16PM

49
#16 - Petro Тrouq / @zulolosi

04/30/2019 at 01:16PM

49
#17 - hoge2341836 / @RootShunsuke

05/03/2019 at 08:53AM

49
#18 - Michał Łowicki / @mlowicki

05/14/2019 at 04:55PM

49
#19 - sooqua / @sooqua

08/08/2019 at 12:24PM

49
#20 - Adam Hartz / @awareofnow

08/23/2019 at 01:19AM

49
#21 - Mario Olofo / @mario_olofo

10/22/2019 at 12:03AM

50
#22 - Koo Zhengqun / @zhengqunkoo

05/04/2019 at 05:04AM

51
#23 - TimMcGuire / @mcguire

05/01/2019 at 02:48PM

51
#24 - Joo Ming / @JooMingJoo

06/06/2019 at 10:58PM

52
#25 - Daniel Hakimian / @danrafhak

05/15/2019 at 01:16AM

52
#26 - Seunghun Lee / @earlbread

05/26/2019 at 01:52PM

52
#27 - Matt / @mcr05

06/09/2019 at 12:26PM

53
#28 - Sherab Giovannini / @shaddycls

05/01/2019 at 12:48PM

53
#29 - Norbert / @mullno

05/03/2019 at 07:54PM

53
#30 - Fiffy / @sr21486642

05/17/2019 at 07:35AM