HTML to Haml
Help convert this HTML page to Haml.
Start file
<html> <head> <title>Vim Rocks!</title> </head> <body> <h1>So does Haml</h1> </body> </html>
End file
%html %head %title Vim Rocks! %body %h1 So does Haml
View Diff
1,8c1,5 < <html> < <head> < <title>Vim Rocks!</title> < </head> < <body> < <h1>So does Haml</h1> < </body> < </html> --- > %html > %head > %title Vim Rocks! > %body > %h1 So does Haml
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 203 remaining solutions by signing in and submitting your own entry
#204 luffy / @raxcoi - Score: 141 - 06/12/15 @ 04:14
:%s#</.*>#<CR>:%s/<\zs.*\ze>/%&<CR>u:<Up><Left><Left>\<CR>u:<Up><Left><Left><Left><Left><Left><BS><BS><BS><BS><BS><BS><BS><BS><Left>\v<Right>(.*)<Right><Right><Right><BS><CR>uu<C-R>:<Up><BS>\1<CR>u:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><BS><BS><CR>:%s/</%<CR>:%s/>/ /<CR>:g/^$/d<CR>:<Up><Left><Left><Left> *<CR>:$<BS>%s/\s*$/<CR>ZZ
0 comments