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 24 remaining solutions by signing in and submitting your own entry
#25 grigouille / grigouille2 - Score: 62 - 06/25/17 @ 16:07
qa0i<Tab><tr><td><Esc>la</td><td><Esc>l.l.ci</tr<Esc>jq6@ao<BS></table><Esc>:t0<CR>lx<Esc>ZZ

0 comments

#26 Lifepillar / lifepillar - Score: 63 - 06/25/17 @ 08:17
qbi<td><Right></<C-P>><Right><Esc>quuqai<Tab><tr><Esc>l3@ba</tr><Esc>+0q5@ao<BS></table><Esc>HO<BS><<C-P>><Esc>ZZ

0 comments

#27 lpag / lpag_ai - Score: 64 - 06/25/17 @ 22:24
:%s#.#<td>&</td>#g|%s#.*#<tr>&</tr><CR>o</table><C-O>gg<table><CR><C-C><C-C>V5j>ZZ

0 comments

#28 Michael Rees / reesmichael1 - Score: 65 - 06/25/17 @ 03:05
qai<tr><td><Esc>la</td><td><Esc>l.l.hhi/<Esc>llrrj0q5@aVgg>O<BS><table><Esc>YGpa/<Esc>ZZ

0 comments

#29 Tomas Sikula / tomsmicroblog - Score: 73 - 06/25/17 @ 16:13
:%s/./\<td\>&\<\/td\>/g<CR>:%s/.\+/\t\<tr\>&\<\/tr\>/g<CR>ggO<BS><table><Esc>:t7<CR>a/<Esc>ZZ

0 comments

#30 杨洋 / 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

30 active golfers, 97 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

55
#16 - Avian Y / y_avian

06/27/2017 at 03:16PM

56
#17 - Jacob Buete / JBuete

07/03/2017 at 02:26AM

56
#18 - Jon Barker / j0nbarker

07/15/2017 at 11:09AM

56
#19 - Cameron Kingsbury / Camsbury

07/15/2017 at 06:39PM

57
#20 - J / J02108006

07/02/2017 at 12:59PM

58
#21 - Michael Brown / mbrown1413

07/06/2017 at 05:03PM

59
#22 - Anne Pacalet / _Anne_P

07/11/2017 at 11:16AM

60
#23 - Anoop Kumar / anooplive

06/24/2017 at 02:10AM

61
#24 - Gurukandhamoorthi / Gurukandhamoor1

07/09/2017 at 05:51PM

62
#25 - grigouille / grigouille2

06/25/2017 at 04:07PM

63
#26 - Lifepillar / lifepillar

06/25/2017 at 08:17AM

64
#27 - lpag / lpag_ai

06/25/2017 at 10:24PM

65
#28 - Michael Rees / reesmichael1

06/25/2017 at 03:05AM

73
#29 - Tomas Sikula / tomsmicroblog

06/25/2017 at 04:13PM

84
#30 - 杨洋 / 176795444

07/01/2017 at 03:12AM