Created
November 15, 2013 23:47
-
-
Save blt/7493749 to your computer and use it in GitHub Desktop.
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
(setq tempo-interactive t) | |
(require 'tempo) | |
(tempo-define-template "erl-module" | |
'( | |
"-module()." n> | |
n> | |
"-ifdef(TEST)."n> | |
"-include_lib(\"eunit/include/eunit.hrl\")."n> | |
"-endif."n> | |
n> | |
"-export([])."n> | |
n> | |
"%%%==================================================================="n> | |
"%%% API"n> | |
"%%%==================================================================="n> | |
n> | |
"%%%==================================================================="n> | |
"%%% Internal Functions"n> | |
"%%%==================================================================="n> | |
n> | |
"%%%==================================================================="n> | |
"%%% Test"n> | |
"%%%==================================================================="n> | |
n> | |
"-ifdef(TEST)."n> | |
n> | |
"some_test_() ->"n> | |
"["n> | |
"?_assertMatch(true, true)"n> | |
"]."n> | |
n> | |
"-endif."n> | |
)) | |
(tempo-define-template "erl-eunit-module" | |
'( | |
"-module()." n> | |
n> | |
"-include_lib(\"eunit/include/eunit.hrl\")."n> | |
n> | |
"%%%===================================================================" n> | |
"%%% fun_test/arity" n> | |
"%%%===================================================================" n> | |
n> | |
> "fun_test_() ->" n> | |
> "[" n> | |
> "{ \"describe your test here\"," n> | |
> "[" n> | |
> "?_assertMatch(true, true)" n> | |
> "]" n> | |
> "}" n> | |
> "]." n> | |
n> | |
"%%%===================================================================" n> | |
"%%% Internal Functions" n> | |
"%%%===================================================================" n> | |
)) | |
(tempo-define-template "erl-gravestone" | |
'("%%%===================================================================" n> | |
"%%% " | |
(p "Heading: ") n> | |
"%%%===================================================================" n> | |
)) | |
(define-skeleton erl-skeleton-intfun-gravestone | |
"Insert an internal function gravestone" | |
\n | |
"%%%===================================================================" \n | |
"%%% Internal Functions" \n | |
"%%%===================================================================" \n | |
\n) | |
(provide 'erl-templates) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment