Yasnippet is a great emacs minor mode that lets you have lots of code snippets easily at hand. Also you can create your own snippets in a very easy way without needing to write them in emacs lisp. Basically, like textmate shortcuts for emacs.
I use html-helper-mode to edit all my html code, but yasnippet works with html-mode only out-of-the-box. To make it work with html-helper-mode, add ‘html-helper-mode-hook’ to yasnippet.el on line 121:
It should look like this:
'(ruby-mode-hook actionscript-mode-hook ox-mode-hook python-mode-hook html-helper-mode-hook))
Then make a symlink to html-mode on the snippets folder. Assuming you are on yasnippets snippets/text-mode/ directory, type:
ln -s html-mode/ html-helper-mode
And now all html snippets will be available on html-helper-mode too.
2 replies on “Make Emacs yasnippet work with html-helper-mode”
Hello, thanks for that!
Why don’t you send a patch to the yasnippet?
Christos Trochalakis,
well, its not really a patch, its more like a hack or workaround. I don’t think it will be accepted since it needs a symlink. I’ll take a deeper look at the code to see if I can come up with a real patch.