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):
50
#31 - Koo Zhengqun / @zhengqunkoo

05/04/2019 at 05:04AM

51
#32 - TimMcGuire / @mcguire

05/01/2019 at 02:48PM

51
#33 - Joo Ming / @JooMingJoo

06/06/2019 at 10:58PM

52
#34 - Daniel Hakimian / @danrafhak

05/15/2019 at 01:16AM

52
#35 - Seunghun Lee / @earlbread

05/26/2019 at 01:52PM

52
#36 - Matt / @mcr05

06/09/2019 at 12:26PM

52
#37 - Bob Streams / @BobStreams1

06/01/2020 at 09:55PM

53
#38 - Sherab Giovannini / @shaddycls

05/01/2019 at 12:48PM

53
#39 - Norbert / @mullno

05/03/2019 at 07:54PM

53
#40 - Fiffy / @sr21486642

05/17/2019 at 07:35AM

53
#41 - Jonathan Eidsness / @jonathaneidsnes

10/09/2019 at 05:06PM

53
#42 - volandkit / @volandkit

04/22/2020 at 11:47PM

54
#43 - Paul Yates / @PYates77

05/06/2019 at 07:39PM

54
#44 - garry quested / @GQuested

07/05/2019 at 09:27AM

54
#45 - Petru-Armand Bancila / @petruarmand

07/10/2019 at 04:08PM

54
#46 - James Bernsen / @jamesbernsen

07/24/2019 at 02:24AM

54
#47 - smlbrngr / @smlbrngr

06/16/2020 at 12:52PM

55
#48 - ๐šƒ๐š’๐š๐š˜๐šž๐šŠ๐š— ๐šƒ๐šŽ๐šข๐šœ๐šœ๐š’๐šŽ๐š› / @TitouanT_

04/26/2019 at 09:33PM

55
#49 - Dan / @dstein64

04/27/2019 at 03:53AM

55
#50 - Gitsnik / @dracyrys

04/27/2019 at 11:03AM

55
#51 - Grant / @grant_7788

04/27/2019 at 02:52PM

55
#52 - Correct Battery Horse / @horse_battery

04/27/2019 at 08:13PM

55
#53 - Roger Bongers / @RogerBongers

04/28/2019 at 04:07AM

55
#54 - Quinn Collins / @Quinn00239061

05/06/2019 at 06:15PM

55
#55 - Ebi / @ehan6

05/21/2020 at 07:32PM

55
#56 - Luoyb / @Luoyb

10/30/2023 at 02:59AM

56
#57 - ใ›ใ„ใปใ† / @FICSQF

04/27/2020 at 05:38AM

56
#58 - Moatvald / @moatvald

05/01/2020 at 02:40PM

57
#59 - ใ‚ดใƒชใƒฉ@ใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใƒ›ใ‚ฆใ‚ฆ / @gorilla0513

05/04/2019 at 08:55AM

57
#60 - vimgolfer24271 / @vimgolfer24271

05/14/2019 at 06:55AM