Install yasnippet and vala-snippets packages

This commit is contained in:
Gergely Polonkai
2016-10-20 10:20:38 +02:00
parent d1468f35a7
commit a498706564
1085 changed files with 12052 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: class
# key: cls
# --
(defclass ${1:name} (${2:inherits})
(${4:slot})
(:documentation "${3:doc}"))
$0

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: comment
# key: /*
# --
#|${1:type the comment here}|#
$0

View File

@@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# name: defpackage
# key: defp
# --
(defpackage #:${1:name}
(:nicknames #:${2:nick})
(:use #:cl #:closer-mop #:${3:package})
(:shadow :${4.symbol})
(:shadowing-import-from #:${5:package} #:${6:symbol})
(:export :$0))

View File

@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: do
# key: do
# --
(do ((${1:var1} ${2:init-form} ${3:step-form})
(${4:var2} ${5:init-form} ${6:step-form}))
(${7:condition} ${8:return-value})
(${9:body}))
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: do
# key: for
# --
(dotimes (${1:var} ${2:count-form})
${3:body})
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: do
# key: foreach
# --
(dolist (${1:var} ${2:list-form})
${3:body})
$0

View File

@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: format
# key: print
# --
(format t "~& $0 ~%")

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: if
# key: if
# --
(when (${1:condition})
(${2:then-do-this}))
$0

View File

@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: ifelse (...) (...) (...) ...
# key: ifelse
# --
(if (${1:condition})
(${2:then})
(${3:else}))
$0

View File

@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: ifnot (...) (...) ...
# key: ifnot
# --
(unless (${1:condition})
(${2:then-do-this}))
$0

View File

@@ -0,0 +1,13 @@
# -*- mode: snippet -*-
# name: slot
# key: slot
# --
(${1:name} :initarg :${1:$(yas/substr yas-text "[^: ]*")}
:initform (error ":${1:$(yas/substr yas-text "[^: ]*")} must be specified")
;; :accessor ${1:$(yas/substr yas-text "[^: ]*")}
:reader ${1:$(yas/substr yas-text "[^: ]*")}-changed
:writer set-${1:$(yas/substr yas-text "[^: ]*")}
:type
:allocation ${3::class :instance}
:documentation "${2:about-slot}")
$0

View File

@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: switch
# key: switch
# --
(cond (${1:case1} (${2:do-this}))
(${3:case2} (${4:do-this}))
(t ${5:default}))
$0

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: typecast
# name: cast
# --
(coerce ${1:object} ${2:type})
$0