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.
#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