Created
November 13, 2010 19:54
-
-
Save jrnold/675584 to your computer and use it in GitHub Desktop.
Use yasnippet templates with aut-insert-mode in emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun yas/expand-by-uuid (mode uuid) | |
"Exapnd snippet template in MODE by its UUID" | |
(yas/expand-snippet | |
(yas/template-content | |
(yas/get-template-by-uuid mode uuid)))) | |
;; Yasnippet templates used in auto-insert mode | |
(require 'autoinsert) | |
(auto-insert-mode) | |
(setq auto-insert-query nil) | |
(define-auto-insert "\.R" | |
'(lambda () (yas/expand-by-uuid 'ess-mode "header"))) | |
;; Also see help for variable auto-insert-alist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Which the newest version of yasnippets, the initial function should be: