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 594db7f41ba5d60135000005

Text to HTML Table

Turn the plain text table to an HTML table.

Start file
012
345
678
9ab
cde
 f 
End file
<table>
	<tr><td>0</td><td>1</td><td>2</td></tr>
	<tr><td>3</td><td>4</td><td>5</td></tr>
	<tr><td>6</td><td>7</td><td>8</td></tr>
	<tr><td>9</td><td>a</td><td>b</td></tr>
	<tr><td>c</td><td>d</td><td>e</td></tr>
	<tr><td> </td><td>f</td><td> </td></tr>
</table>

View Diff

1,6c1,8
< 012
< 345
< 678
< 9ab
< cde
<  f 
---
> <table>
> 	<tr><td>0</td><td>1</td><td>2</td></tr>
> 	<tr><td>3</td><td>4</td><td>5</td></tr>
> 	<tr><td>6</td><td>7</td><td>8</td></tr>
> 	<tr><td>9</td><td>a</td><td>b</td></tr>
> 	<tr><td>c</td><td>d</td><td>e</td></tr>
> 	<tr><td> </td><td>f</td><td> </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 37 remaining solutions by signing in and submitting your own entry
#38 杨洋 / @176795444 - Score: 84 - 07/01/17 @ 03:12
:%s#.#<td>&</td>#g<CR>:%s#.*$<BS>#<tr>&</tr>#l<BS><CR>o<table<BS><BS><BS><BS><BS>/table><C-O>gg<table><CR>s<BS><C-C><C-C><C-C><C-C>V5j>ZZ

0 comments


Created by: @tpenguinltg

38 active golfers, 127 entries

Leaderboard (lowest score wins):
52
#1 - Urtica dioica / @udioica

06/24/2017 at 02:06AM

52
#2 - YamasakiKenta / @ymknjugg

06/24/2017 at 07:30AM

52
#3 - Petro Тrouq / @zulolosi

06/24/2017 at 04:14PM

52
#4 - Mayank Suman / @mayank_suman

06/24/2017 at 04:35PM

52
#5 - vimgolf player / @VimgolfPlayer

06/26/2017 at 07:18PM

52
#6 - John Braxler / @braxler

06/27/2017 at 03:34PM

52
#7 - Song Zheng / @songz

06/27/2017 at 07:11PM

52
#8 - Vim Girl / @vim_girl

06/27/2017 at 08:13PM

52
#9 - akanb / @GAkt6L6SlKhy8zA

06/28/2017 at 03:25AM

52
#10 - Saki Gw / @Sakigw

06/29/2017 at 02:02PM

52
#11 - Bennett Bernardoni / @BBernardoni

06/29/2017 at 02:25PM

52
#12 - Kieron Browne / @KieronBrowne1

06/29/2017 at 06:55PM

52
#13 - Ben Hill / @KaizenSoze70

07/01/2017 at 01:43AM

52
#14 - Михаил Добров / @mSuGfwFz2ZNvv5b

07/09/2017 at 08:44AM

52
#15 - devoh / @devvohh

07/28/2017 at 01:59PM

52
#16 - Charlie OConor / @charlieoconor

10/03/2017 at 03:30PM

52
#17 - Turkey Man / @lvturkeyman

11/13/2017 at 07:08AM

52
#18 - Benoit Mortgat / @Benoit_Mortgat

11/15/2017 at 02:39PM

53
#19 - DHM / @DHM29978992

04/30/2018 at 01:52AM

53
#20 - Anders / @cptand

05/07/2018 at 05:44PM

53
#21 - PCS Solutions / @PeteSolutions

08/21/2018 at 05:29PM

55
#22 - Avian Y / @y_avian

06/27/2017 at 03:16PM

56
#23 - Jacob Buete / @JBuete

07/03/2017 at 02:26AM

56
#24 - Jon Barker / @j0nbarker

07/15/2017 at 11:09AM

56
#25 - Cameron Kingsbury / @Camsbury

07/15/2017 at 06:39PM

56
#26 - Terry Ding / @TerryDing77

08/24/2017 at 04:07PM

57
#27 - Pfhor / @PfhorShark

07/02/2017 at 12:59PM

58
#28 - Michael Brown / @mbrown1413

07/06/2017 at 05:03PM

59
#29 - Anne Pacalet / @_Anne_P

07/11/2017 at 11:16AM

60
#30 - Anoop Kumar / @anooplive

06/24/2017 at 02:10AM