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 5fe3ddcb8a967b00099d7e59

RUST HTML to maud.

RUST HTML to maud. maud is one of the template engines for server-side rendering based on rust. rusty practice on vimgolf

Start file
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>This is title</title>
	</head>
	<body>
		<h1 class="hello">Hello maud!</h1>
		<p id="best" class="truth">Maud is best pony</p>
		<div id="beautiful" class="truth">Maud is the most beautiful pony</div>
		<br>
		<span id="adorable" class="truth">Maud is adorable</span>
		<br>
		<p class="anything">Maud is<input id="something" type="text" value="anything"/></p>
	</body>
</html>
End file
html! {
	(DOCTYPE)
	html {
		head {
			meta charset="UTF-8"
			title "This is title"
		}
		body {
			h1.hello "Hello maud!"
			p#best.truth "Maud is best pony"
			div#beautiful.truth "Maud is the most beautiful pony"
			br;
			span#adorable.truth "Maud is adorable"
			br;
			p.anything {
				"Maud is"
				input#something type="text" value="anything"
			}
		}
	}
}

View Diff

1,16c1,21
< <!DOCTYPE html>
< <html>
< 	<head>
< 		<meta charset="UTF-8">
< 		<title>This is title</title>
< 	</head>
< 	<body>
< 		<h1 class="hello">Hello maud!</h1>
< 		<p id="best" class="truth">Maud is best pony</p>
< 		<div id="beautiful" class="truth">Maud is the most beautiful pony</div>
< 		<br>
< 		<span id="adorable" class="truth">Maud is adorable</span>
< 		<br>
< 		<p class="anything">Maud is<input id="something" type="text" value="anything"/></p>
< 	</body>
< </html>
---
> html! {
> 	(DOCTYPE)
> 	html {
> 		head {
> 			meta charset="UTF-8"
> 			title "This is title"
> 		}
> 		body {
> 			h1.hello "Hello maud!"
> 			p#best.truth "Maud is best pony"
> 			div#beautiful.truth "Maud is the most beautiful pony"
> 			br;
> 			span#adorable.truth "Maud is adorable"
> 			br;
> 			p.anything {
> 				"Maud is"
> 				input#something type="text" value="anything"
> 			}
> 		}
> 	}
> }

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 11 remaining solutions by signing in and submitting your own entry
#12 김도현 / @pykJzzzsmAzloZl - Score: 929 - 12/24/20 @ 01:11
xxlllllllllllllllxhhhhhhhhhhhhhhhhhi(<Esc>llllllla)<Esc>lhhhhhhhhhhhhhhi<CR><Esc>lllllllllllhhDkphhhhxllllllla!<Esc>la {<CR><BS><Esc>jvjjjjjjjjjjjjjjj><Esc>jxllllxusa<BS> {<CR>}<CR>}<Esc>v<jVGkdkkkpjjjjjjjjjjjjjjjjjjjddkkkkkkkkkkkkkkf<xlllllxa {<Esc>v>ljlxlllllllllllllllllllllxjhhhhhhhhhhhhhhhhhhhhlxlllllxa<Esc>i " <BS><Esc>llllllllllllllDa"<Esc>jjkuuC"<Esc>jhhhhhhD}<Esc>kkkkkkkkkklklla}j<BS><Esc>i<BS><Esc>jlxllllxa P<BS>{<Esc>jjjjjjjjddko}<Esc>hli<BS><Esc>kkkkkklllkhxjxjxjxjxjxjxllkhjlhxxxxxxxxi.<Esc>lllllllllllhhxxi "<Esc>i{<CR><Esc>v>lllllllli"<CR><Esc>llhxlllllla{<BS><BS><Esc>OP<Esc><Esc>kjJhxxllllllhxxuuuxlllllxxxxi#<Esc>llllllllllvllllllhhhhhhldi <Esc>lllllllhllllllllllllllllllllllllhxxxxxxo}<Esc>hhlli<BS><Esc>kkkklllr;kkr;kkkllllllllllllllhhhhhhhhhhhhhhxxxxxxxxi.<Esc>lllllllxhi <Esc>llllllllllllllhC"<Esc>jhhhhhhhhhhhhhhhhhhhhhlxxxxxi#<Esc>llllllhxxxxxxxxxi.<Esc>llllllllhxhi <Esc>lllllllllllllllllllC"<Esc>jhhhhhhhhhhhhhhhhhhhhhhhhhhhhxxxxxi#<Esc>llllllllllxxxxxxxxxi.<Esc>lllllllhlxhi <Esc>f<C"<Esc>jjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhxxxxxi#<Esc>lllllllllxxxxxxxxxi.<Esc>lllllllxhi <Esc>llllllllllllllllllC"<Esc>jj:wq<CR>

@pykJzzzsmAzloZl: I smoked by submitting a crappy solution as braxler's advice. I will submit my real solution on December 25th, 2020 at 10am KST.

@braxler: Excellent! Thank you. Given the new year close at hand, I'll likely not look at this one until much later.

2 comments


Created by: @pykJzzzsmAzloZl

12 active golfers, 24 entries

Leaderboard (lowest score wins):
135
#1 - Jean George / @JeanGeo20504212

04/01/2022 at 08:43AM

135
#2 - Peppa Pig / @PeppaPigSg

07/02/2024 at 05:29AM

159
#3 - quemeraisc / @quemeraisc

05/05/2022 at 02:29PM

209
#4 - Andreas Siegrist / @andreaszwei

03/19/2021 at 04:04PM

215
#5 - simplelife2010 / @simplelife20101

05/13/2021 at 07:22PM

219
#6 - drumstix576 / @drumstix576

01/23/2022 at 03:39PM

235
#7 - nickGPT / @nickandbro

08/24/2024 at 03:21AM

238
#8 - Florian Leitner / @flowing

12/06/2022 at 10:30PM

292
#9 - Lily / @totallyuniquelily

04/22/2024 at 08:15AM

305
#10 - Yunus Emre Yücel / @_yunusey_

02/24/2023 at 01:41AM

313
#11 - grsh / @girish_i_am

05/23/2021 at 08:55AM

929
#12 - 김도현 / @pykJzzzsmAzloZl

12/24/2020 at 01:11AM