aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/vim-snippets/snippets/clojure.snippets
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-06-30 16:03:25 +0200
committerKarel Kočí <cynerd@email.cz>2016-06-30 16:03:25 +0200
commite573b3020c032400eed60b649a2cbf55266e6bb0 (patch)
tree8f572394ac8433529c7a8e70d160a2fbe8268b4e /vim/bundle/vim-snippets/snippets/clojure.snippets
parentb8c667bd64b3edd38d56c63c5bd1db53a23b4499 (diff)
downloadmyconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.tar.gz
myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.tar.bz2
myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.zip
Add current configurations from old repository
Diffstat (limited to 'vim/bundle/vim-snippets/snippets/clojure.snippets')
-rw-r--r--vim/bundle/vim-snippets/snippets/clojure.snippets87
1 files changed, 87 insertions, 0 deletions
diff --git a/vim/bundle/vim-snippets/snippets/clojure.snippets b/vim/bundle/vim-snippets/snippets/clojure.snippets
new file mode 100644
index 0000000..152f896
--- /dev/null
+++ b/vim/bundle/vim-snippets/snippets/clojure.snippets
@@ -0,0 +1,87 @@
+snippet comm
+ (comment
+ ${0})
+snippet condp
+ (condp ${1:pred} ${2:expr}
+ ${0})
+snippet def
+ (def ${0})
+snippet defm
+ (defmethod ${1:multifn} "${2:doc-string}" ${3:dispatch-val} [${4:args}]
+ ${0})
+snippet defmm
+ (defmulti ${1:name} "${2:doc-string}" ${0:dispatch-fn})
+snippet defma
+ (defmacro ${1:name} "${2:doc-string}" ${0:dispatch-fn})
+snippet defn
+ (defn ${1:name} "${2:doc-string}" [${3:arg-list}]
+ ${0})
+snippet defp
+ (defprotocol ${1:name}
+ ${0})
+snippet defr
+ (defrecord ${1:name} [${2:fields}]
+ ${3:protocol}
+ ${0})
+snippet deft
+ (deftest ${1:name}
+ (is (= ${0:assertion})))
+snippet is
+ (is (= ${1} ${0}))
+snippet defty
+ (deftype ${1:Name} [${2:fields}]
+ ${3:Protocol}
+ ${0})
+snippet doseq
+ (doseq [${1:elem} ${2:coll}]
+ ${0})
+snippet fn
+ (fn [${1:arg-list}] ${0})
+snippet if
+ (if ${1:test-expr}
+ ${2:then-expr}
+ ${0:else-expr})
+snippet if-let
+ (if-let [${1:result} ${2:test-expr}]
+ (${3:then-expr} $1)
+ (${0:else-expr}))
+snippet imp
+ (:import [${1:package}])
+ & {:keys [${1:keys}] :or {${0:defaults}}}
+snippet let
+ (let [${1:name} ${2:expr}]
+ ${0})
+snippet letfn
+ (letfn [(${1:name}) [${2:args}]
+ ${0})])
+snippet map
+ (map ${1:func} ${0:coll})
+snippet mapl
+ (map #(${1:lambda}) ${0:coll})
+snippet met
+ (${1:name} [${2:this} ${3:args}]
+ ${0})
+snippet ns
+ (ns ${0:name})
+snippet dotimes
+ (dotimes [_ 10]
+ (time
+ (dotimes [_ ${1:times}]
+ ${0})))
+snippet pmethod
+ (${1:name} [${2:this} ${0:args}])
+snippet refer
+ (:refer-clojure :exclude [${0}])
+snippet require
+ (:require [${1:namespace} :as [${0}]])
+snippet use
+ (:use [${1:namespace} :only [${0}]])
+snippet print
+ (println ${0})
+snippet reduce
+ (reduce ${1:(fn [p n] ${3})} ${2})
+snippet when
+ (when ${1:test} ${0:body})
+snippet when-let
+ (when-let [${1:result} ${2:test}]
+ ${0:body})