I use HAML a lot, it’s a very nice templating language. And I copy a lot of html/erb snippets to my haml views. Here is how you can configure vim to convert your html to haml.
1) Install the html2haml gem. If you are using rvm, generate a wrapper using the code below.
2) Add the following mapping to your
That’s it, now you can select a block of text and hit the
to convert your html/erb to haml. You need to make sure that the paths and the
rvm strings correspond to your machine settings to get this working, also
html2haml needs a few more gems. Check html2haml for more info