Search code examples
emacsbottleyasnippet

Point existing YAsnippet mode to a new filetype


I am running through the Bottle tutorial, and the YAsnippet mode for HTML would get me a large share of the productivity bonuses I am used to when crafting Bottle template files (.tpl).

Is there a way to tell YAsnippet to look at the existing entries under html-mode when opening filetypes of the extension .tpl?


Solution

  • One possible solution: associate tpl files with html-mode:

    (add-to-list 'auto-mode-alist '("\\.tpl\\'" . html-mode))
    

    Another: copy the directory html-mode in snippets to a directory which has the same name as the mode you use for tpl files.