Make Emacs yasnippet work with html-helper-mode

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

Image is Creative Commons byitspaulkelly
Share:
  • Digg
  • del.icio.us
  • Technorati
  • Reddit
  • StumbleUpon
  • Facebook
  • Meneame
  • FriendFeed
  • Identi.ca
  • Twitter
  • Google Bookmarks

Related posts:

  1. PHP syntax check as you type with Emacs
  2. Identica mode for Emacs update: support for any Laconica server
  3. Emacs identica-mode version 0.7
  4. Emacs Identica-mode microblogging client v1.0 release
  5. Emacs identica-mode with multiple timelines and direct messages

You can leave a response, or trackback from your own site.

2 Responses to “Make Emacs yasnippet work with html-helper-mode”

  1. Hello, thanks for that!

    Why don’t you send a patch to the yasnippet?

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

Leave a Reply


Subscribe to RSS Feed