From e91c6af2bb45b902431bcc4ad0fcae24bfe829ea Mon Sep 17 00:00:00 2001 From: ujihisa Date: Mon, 27 May 2013 17:51:16 -0700 Subject: [PATCH] Added clojure snippets. --- autoload/neosnippet/snippets/clojure.snip | 28 +++++++++++++++++++++++ doc/neosnippet.txt | 3 +++ 2 files changed, 31 insertions(+) create mode 100644 autoload/neosnippet/snippets/clojure.snip diff --git a/autoload/neosnippet/snippets/clojure.snip b/autoload/neosnippet/snippets/clojure.snip new file mode 100644 index 0000000..bf50deb --- /dev/null +++ b/autoload/neosnippet/snippets/clojure.snip @@ -0,0 +1,28 @@ +snippet defn-doc +abbr defn function "..." [...] ... +options head + (defn ${1:name} + "${2:doc}" + [${3}] + ${0}) + +snippet try +abbr (try ... (catch ... + (try + ${1} + (catch ${2:Exception} e ${3:nil})) + +snippet ref-set +abbr (dosync (ref-set ... +options head + (dosync + (ref-set ${1:ref} ${2:value})) + +# http://tnoda-clojure.tumblr.com/post/24969285880/clojure-scripting +snippet shebang +options head + #^:shebang '[ + exec java -cp \`locate clojure- | grep -P "clojure-[\\d\\.]+\\.jar$" | tail -1\` clojure.main "\$0" + ] + + diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 4b13569..3e126d1 100755 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -784,6 +784,9 @@ A: You can use |:NeoSnippetSource| for it. ============================================================================== CHANGELOG *neosnippet-changelog* +2013-05-27 +- Added clojure snippets. + 2013-05-21 - Improved neosnippet initialization.