A snippet.el-like interface for your tempo templates. Watch the demo.
Add the following to your .emacs file:
(add-to-list 'load-path "/path/to/tempo-snippets") (require 'tempo-snippets)
Use tempo-define-snippet
instead of tempo-define-template
. The arguments can remain the same. Insertion works like for any tempo-template with tempo-template-your-template-name
.
When adding lisp forms in your templates that use tempo-lookup-named
, make sure they don't have side-effects, because they will be evaluated every time the variables change.
You can navigate between input forms with tempo-snippets-next-field
and tempo-snippets-previous-field
. When the point is on an input field, those commands are bound to M-n and M-p by default. You can use tempo-snippets-keymap
to bind keys for input fields.
If you want to add a snippet to your abbrev table, you can do M-x tempo-snippets-add-mode-abbrev or M-x tempo-snippets-add-global-abbrev.
If you have any feedback, please email me, or visit this package's page at the Emacs wiki.