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 537a553282aa3e000222048a

HTML formatting: vertical alignment for readability

We did this a VimGolf challenge at work and now that we have finished I want to see if you guys can come up with something even better than we could. Our best solution was 44 keystrokes.

Start file
<table>
<thead>
<th>
<th id="first_name">First Name</th>
<th id="last_name">Last Name</th>
<th id="address">Address</th>
<th id="city">City</th>
<th id="state">State</th>
<th id="zip_postal">Zip</th>
<th id="country">Country</th>
<th id="phone">Phone</th>
</th>
</thead>
</table>
End file
<table>
	<thead>
		<th>
		<th id="first_name"> First Name</th>
		<th id="last_name "> Last Name </th>
		<th id="address   "> Address   </th>
		<th id="city      "> City      </th>
		<th id="state     "> State     </th>
		<th id="zip_postal"> Zip       </th>
		<th id="country   "> Country   </th>
		<th id="phone     "> Phone     </th>
		</th>
	</thead>
</table>

View Diff

2,13c2,13
< <thead>
< <th>
< <th id="first_name">First Name</th>
< <th id="last_name">Last Name</th>
< <th id="address">Address</th>
< <th id="city">City</th>
< <th id="state">State</th>
< <th id="zip_postal">Zip</th>
< <th id="country">Country</th>
< <th id="phone">Phone</th>
< </th>
< </thead>
---
> 	<thead>
> 		<th>
> 		<th id="first_name"> First Name</th>
> 		<th id="last_name "> Last Name </th>
> 		<th id="address   "> Address   </th>
> 		<th id="city      "> City      </th>
> 		<th id="state     "> State     </th>
> 		<th id="zip_postal"> Zip       </th>
> 		<th id="country   "> Country   </th>
> 		<th id="phone     "> Phone     </th>
> 		</th>
> 	</thead>

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 35 remaining solutions by signing in and submitting your own entry
#36 Chris Davison / @davisonnn - Score: 227 - 05/24/14 @ 23:25
2Gv13G>3Gv12G> /Fi <BS><BS><CR>i <Esc>kjjhhhi <Esc>llli l<Esc>xlllllllla <Esc>jhhhhhhhhhhhhha<Esc>i   <Esc>fAil<BS> <Esc>%fCjFChhi      <Esc>fCi k<BS><Esc>kfs;a   <Esc>jFya      <Esc>jF"i4 =<BS><BS><BS>     <Esc>fSi <Esc>fei<Right>     <Esc>jf"F"fZi <Right><Right><Right>       <Esc>jf"F"i   <Esc>fCi <Esc>fya   <Esc>jF"i     <Esc>fPi <Esc>fea     ZZ<BS><BS><Esc>ZZ

0 comments


Created by: @kirk_bauer

36 active golfers, 88 entries

Leaderboard (lowest score wins):
32
#1 - Peppa Pig / @PeppaPigSg

07/03/2024 at 04:10AM

33
#2 - Urtica dioica / @udioica

05/19/2014 at 09:18PM

33
#3 - wizardwerdna / @wizardwerdna

05/20/2014 at 04:05AM

33
#4 - John Braxler / @braxler

05/20/2014 at 04:15PM

33
#5 - Petro Тrouq / @zulolosi

05/20/2014 at 06:40PM

33
#6 - MP / @Enemy_m

05/20/2014 at 06:53PM

33
#7 - Benoit d'Oncieu / @bdoncieu

05/25/2014 at 07:42PM

33
#8 - Teodor Kotov / @Microfed

05/28/2014 at 09:48PM

33
#9 - Robert Bruce / @therealrobru

06/11/2014 at 11:23PM

33
#10 - playalong / @playwithit42

07/16/2014 at 09:53AM

33
#11 - nickGPT / @nickandbro

08/28/2024 at 05:46PM

34
#12 - Benjamin Williams / @benjaminjosephw

05/19/2014 at 09:41PM

36
#13 - pftb12345 / @pftb12345

04/20/2015 at 02:29PM

36
#14 - Jon Krause / @jkrause314

01/20/2016 at 06:48AM

36
#15 - Иван / @wansmer

04/25/2023 at 01:18PM

38
#16 - Carlos A Henríquez Q / @lagunex

03/01/2015 at 03:14PM

43
#17 - Markus Kasper / @KasperBox

05/21/2014 at 02:40PM

45
#18 - vimgolf copycat / @vimgolf_copycat

05/25/2014 at 11:49AM

45
#19 - Jon Nyman / @NymanJon

09/12/2015 at 05:57PM

50
#20 - Kai Yuan / @kentyuan

05/19/2014 at 11:22PM

54
#21 - Pedro Santos / @pedrosans

05/19/2014 at 10:19PM

60
#22 - ゆきみ / @edp02

06/27/2014 at 02:09PM

60
#23 - Juan-Lucas Picard / @davidmh

09/09/2014 at 06:37AM

61
#24 - ryk / @rykarn

05/23/2014 at 08:21PM

80
#25 - Carlos López / @morrizon

05/21/2014 at 01:18AM

83
#26 - mnx / @mnxx

06/12/2014 at 11:07AM

85
#27 - jolka / @jolka19296078

05/22/2014 at 02:42PM

90
#28 - Ram Tamtam / @ramtamtamtam

06/30/2014 at 09:36AM

93
#29 - RobertT / @techrt2050

05/20/2014 at 05:29PM

98
#30 - james_bunch / @james_bunch

05/20/2014 at 02:39PM