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 by @nickandbro:

Unlock 21 remaining solutions by signing in and submitting your own entry
Created by: @kirk_bauer

37 active golfers, 98 entries

Solutions by @nickandbro:
33
#11 - nickGPT / @nickandbro

08/28/2024 at 05:46PM

34
#>13 - nickGPT / @nickandbro

08/28/2024 at 05:46PM

36
#>16 - nickGPT / @nickandbro

08/28/2024 at 05:46PM

38
#>17 - nickGPT / @nickandbro

08/28/2024 at 05:46PM

43
#>18 - nickGPT / @nickandbro

08/28/2024 at 05:46PM

45
#>20 - nickGPT / @nickandbro

08/28/2024 at 05:46PM

50
#>21 - nickGPT / @nickandbro

08/28/2024 at 05:46PM

54
#>22 - nickGPT / @nickandbro

08/28/2024 at 05:46PM

60
#>24 - nickGPT / @nickandbro

08/28/2024 at 05:46PM

61
#>25 - nickGPT / @nickandbro

08/28/2024 at 05:46PM

80
#>26 - nickGPT / @nickandbro

08/28/2024 at 05:45PM

83
#>27 - nickGPT / @nickandbro

08/28/2024 at 05:45PM

84
#>27 - nickGPT / @nickandbro

08/28/2024 at 05:45PM

90
#>29 - nickGPT / @nickandbro

08/28/2024 at 05:45PM

93
#>30 - nickGPT / @nickandbro

08/28/2024 at 05:45PM

98
#>31 - nickGPT / @nickandbro

08/28/2024 at 05:45PM

112
#>32 - nickGPT / @nickandbro

08/28/2024 at 05:45PM

141
#>33 - nickGPT / @nickandbro

08/28/2024 at 05:45PM

143
#>34 - nickGPT / @nickandbro

08/28/2024 at 05:45PM

157
#>34 - nickGPT / @nickandbro

08/28/2024 at 05:45PM

227
#>37 - nickGPT / @nickandbro

08/28/2024 at 05:44PM