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 125 remaining solutions by signing in and submitting your own entry
#126 ippachi / @ippachi1018 - 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

126 active golfers, 606 entries

Leaderboard (lowest score wins):
57
#61 - Erik Lindeborg / @ErikLindeborg

06/08/2019 at 03:45PM

57
#62 - Johannes / @joka253

06/21/2019 at 08:25AM

58
#63 - BaffaloP 🐃🎨 / @bbaffalopp

04/27/2019 at 10:59AM

58
#64 - albalitz / @_albalitz

06/21/2019 at 08:15AM

58
#65 - Ron Holt / @ron_holt

08/03/2019 at 03:47AM

58
#66 - theBecwar / @thebecwar

08/18/2019 at 10:01PM

58
#67 - Matt Aschmann / @ma7hatter

12/26/2019 at 05:48PM

58
#68 - 0xf00ff00f / @0xf00ff00f

12/15/2022 at 06:33PM

59
#69 - william cedervall / @Master_smily

05/13/2019 at 01:54PM

59
#70 - Elcio Ferreira / @elcio

05/15/2019 at 12:22AM

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

06/03/2019 at 04:07PM

60
#72 - Charlie OConor / @charlieoconor

07/25/2019 at 08:31PM

60
#73 - Oleg Skillup / @skill_up

08/24/2019 at 09:37AM

60
#74 - Madelyn Freed / @EcoBummer

09/04/2019 at 09:29PM

60
#75 - Pogues 123 / @123Pogues

09/20/2019 at 12:42AM

60
#76 - Lory / @Lory46845742

11/01/2019 at 02:03PM

60
#77 - Martin Kauppinen / @MartinKauppinen

08/16/2020 at 07:04PM

61
#78 - Jairo Suarez / @xyos

05/08/2019 at 03:38PM

61
#79 - Nolen Royalty / @NolenRoyalty

05/09/2019 at 03:55AM

63
#80 - Bruce.Z.Lee / @cvilo4ZLK3OD9WG

06/21/2019 at 01:19AM

63
#81 - Joel Elkins / @dice_tea

08/03/2019 at 10:45PM

64
#82 - rg thomas / @rgt47

04/26/2019 at 10:30PM

64
#83 - ui / @ui61065627

05/01/2019 at 02:31AM

64
#84 - Jason Neylon / @jasonneylon

01/15/2020 at 06:51PM

65
#85 - Peter Demin / @peterdemin

07/12/2019 at 08:11PM

65
#86 - Miko / @_m_ik_o_

09/26/2019 at 08:49PM

66
#87 - Ivo Blöchliger / @aigledesalpes

08/02/2019 at 08:25PM

67
#88 - Dan Kilman / @dan_kilman

01/03/2020 at 10:57PM

68
#89 - Kasper Siig / @knsiig

05/07/2019 at 04:42PM

68
#90 - Jason / @roosjason

04/30/2020 at 08:33AM