1
0
Fork 0
mirror of synced 2024-11-05 08:58:59 -05:00
ultimate-vim/sources_non_forked/vim-snippets/snippets/clojure.snippets

91 lines
1.8 KiB
Text
Raw Normal View History

2012-08-16 23:41:25 -04:00
snippet comm
(comment
${0}
2012-08-16 23:41:25 -04:00
)
snippet condp
(condp ${1:pred} ${2:expr}
${0})
2012-08-16 23:41:25 -04:00
snippet def
(def ${0})
2012-08-16 23:41:25 -04:00
snippet defm
(defmethod ${1:multifn} "${2:doc-string}" ${3:dispatch-val} [${4:args}]
${0})
2012-08-16 23:41:25 -04:00
snippet defmm
(defmulti ${1:name} "${2:doc-string}" ${0:dispatch-fn})
2012-08-16 23:41:25 -04:00
snippet defma
(defmacro ${1:name} "${2:doc-string}" ${0:dispatch-fn})
2012-08-16 23:41:25 -04:00
snippet defn
(defn ${1:name} "${2:doc-string}" [${3:arg-list}]
${0})
2012-08-16 23:41:25 -04:00
snippet defp
(defprotocol ${1:name}
${0})
2012-08-16 23:41:25 -04:00
snippet defr
(defrecord ${1:name} [${2:fields}]
${3:protocol}
${0})
2012-08-16 23:41:25 -04:00
snippet deft
(deftest ${1:name}
(is (= ${2:assertion})))
${0})
2012-08-16 23:41:25 -04:00
snippet is
(is (= ${1} ${0}))
2012-08-16 23:41:25 -04:00
snippet defty
(deftype ${1:Name} [${2:fields}]
${3:Protocol}
${0})
2012-08-16 23:41:25 -04:00
snippet doseq
(doseq [${1:elem} ${2:coll}]
${0})
2012-08-16 23:41:25 -04:00
snippet fn
(fn [${1:arg-list}] ${0})
2012-08-16 23:41:25 -04:00
snippet if
(if ${1:test-expr}
${2:then-expr}
${0:else-expr})
2013-07-17 19:06:05 -04:00
snippet if-let
2012-08-16 23:41:25 -04:00
(if-let [${1:result} ${2:test-expr}]
(${3:then-expr} $1)
(${0:else-expr}))
2012-08-16 23:41:25 -04:00
snippet imp
(:import [${1:package}])
& {:keys [${1:keys}] :or {${0:defaults}}}
2012-08-16 23:41:25 -04:00
snippet let
(let [${1:name} ${2:expr}]
${0})
2012-08-16 23:41:25 -04:00
snippet letfn
(letfn [(${1:name) [${2:args}]
${0})])
2012-08-16 23:41:25 -04:00
snippet map
(map ${1:func} ${0:coll})
2012-08-16 23:41:25 -04:00
snippet mapl
(map #(${1:lambda}) ${0:coll})
2012-08-16 23:41:25 -04:00
snippet met
(${1:name} [${2:this} ${3:args}]
${0})
2012-08-16 23:41:25 -04:00
snippet ns
(ns ${1:name}
${0})
2012-08-16 23:41:25 -04:00
snippet dotimes
(dotimes [_ 10]
(time
(dotimes [_ ${1:times}]
${0})))
2012-08-16 23:41:25 -04:00
snippet pmethod
(${1:name} [${2:this} ${0:args}])
2012-08-16 23:41:25 -04:00
snippet refer
(:refer-clojure :exclude [${0}])
2012-08-16 23:41:25 -04:00
snippet require
(:require [${1:namespace} :as [${0}]])
2012-08-16 23:41:25 -04:00
snippet use
(:use [${1:namespace} :only [${0}]])
2012-08-16 23:41:25 -04:00
snippet print
(println ${0})
2012-08-16 23:41:25 -04:00
snippet reduce
(reduce ${1:(fn [p n] ${3})} ${2})
snippet when
(when ${1:test} ${0:body})
2012-08-16 23:41:25 -04:00
snippet when-let
(when-let [${1:result} ${2:test}]
${0:body})