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

Unlock 1 remaining solutions by signing in and submitting your own entry
Created by: @pykJzzzsmAzloZl

4 active golfers, 6 entries

Solutions by @pykJzzzsmAzloZl:
929
#4 - κΉ€λ„ν˜„ / @pykJzzzsmAzloZl

12/24/2020 at 01:11AM