summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--snippets/c++-mode/#i.yasnippet4
-rw-r--r--snippets/c++-mode/local-#i.yasnippet5
-rw-r--r--snippets/c-mode/fopen3
-rw-r--r--snippets/delphi-mode/begin ... end.yasnippet8
-rw-r--r--snippets/delphi-mode/class (class).yasnippet8
-rw-r--r--snippets/delphi-mode/constructor, destructor.yasnippet9
-rw-r--r--snippets/delphi-mode/dbg.yasnippet6
-rw-r--r--snippets/delphi-mode/for ... end.yasnippet9
-rw-r--r--snippets/delphi-mode/func-prototype.yasnippet8
-rw-r--r--snippets/delphi-mode/func.yasnippet10
-rw-r--r--snippets/delphi-mode/if ... end.yasnippet9
-rw-r--r--snippets/delphi-mode/procedure-prototype.yasnippet8
-rw-r--r--snippets/delphi-mode/procedure.yasnippet10
-rw-r--r--snippets/delphi-mode/try ... finally.yasnippet10
-rw-r--r--snippets/erlang-mode/inc.lib4
-rw-r--r--snippets/text-mode/email3
-rw-r--r--snippets/text-mode/time3
17 files changed, 117 insertions, 0 deletions
diff --git a/snippets/c++-mode/#i.yasnippet b/snippets/c++-mode/#i.yasnippet
new file mode 100644
index 0000000..b150d38
--- /dev/null
+++ b/snippets/c++-mode/#i.yasnippet
@@ -0,0 +1,4 @@
+# -*- mode: snippet -*-
+# name: #include <...>
+# --
+#include <$0> \ No newline at end of file
diff --git a/snippets/c++-mode/local-#i.yasnippet b/snippets/c++-mode/local-#i.yasnippet
new file mode 100644
index 0000000..ceb4b37
--- /dev/null
+++ b/snippets/c++-mode/local-#i.yasnippet
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: #include "..."
+# key: #i
+# --
+#include "$0" \ No newline at end of file
diff --git a/snippets/c-mode/fopen b/snippets/c-mode/fopen
new file mode 100644
index 0000000..044c743
--- /dev/null
+++ b/snippets/c-mode/fopen
@@ -0,0 +1,3 @@
+#name : FILE *fp = fopen(..., ...);
+# --
+FILE *${fp} = fopen(${"file"}, "${r}");
diff --git a/snippets/delphi-mode/begin ... end.yasnippet b/snippets/delphi-mode/begin ... end.yasnippet
new file mode 100644
index 0000000..5b02ee0
--- /dev/null
+++ b/snippets/delphi-mode/begin ... end.yasnippet
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# contributor: Alexander Sulfrian <alexander@sulfrian.net>
+# name: begin ... end
+# key: begin
+# --
+begin
+$0
+end; \ No newline at end of file
diff --git a/snippets/delphi-mode/class (class).yasnippet b/snippets/delphi-mode/class (class).yasnippet
new file mode 100644
index 0000000..a0d8b46
--- /dev/null
+++ b/snippets/delphi-mode/class (class).yasnippet
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# contributor: Alexander Sulfrian <alexander@sulfrian.net>
+# name: class (class)
+# key: class
+# --
+T${1:ClassName} = class
+$0
+end; \ No newline at end of file
diff --git a/snippets/delphi-mode/constructor, destructor.yasnippet b/snippets/delphi-mode/constructor, destructor.yasnippet
new file mode 100644
index 0000000..114f30e
--- /dev/null
+++ b/snippets/delphi-mode/constructor, destructor.yasnippet
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# contributor: Alexander Sulfrian <alexander@sulfrian.net>
+# name: constructor, destructor
+# key: constructor
+# condition: (delphi-in-class-definition)
+# --
+constructor Create(${1:});
+destructor Destroy; override;
+ $0$> \ No newline at end of file
diff --git a/snippets/delphi-mode/dbg.yasnippet b/snippets/delphi-mode/dbg.yasnippet
new file mode 100644
index 0000000..66fc15f
--- /dev/null
+++ b/snippets/delphi-mode/dbg.yasnippet
@@ -0,0 +1,6 @@
+# -*- mode: snippet -*-
+# contributor : Alexander Sulfrian <alexander@sulfrian.net>
+# name: dbg
+# --
+DebugWriteln($1);
+ $0$> \ No newline at end of file
diff --git a/snippets/delphi-mode/for ... end.yasnippet b/snippets/delphi-mode/for ... end.yasnippet
new file mode 100644
index 0000000..5353d53
--- /dev/null
+++ b/snippets/delphi-mode/for ... end.yasnippet
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# contributor: Alexander Sulfrian <alexander@sulfrian.net>
+# name: for ... end
+# key: for
+# --
+for ${1:I} := ${2:0} to ${3:max} do
+begin
+$0
+end; \ No newline at end of file
diff --git a/snippets/delphi-mode/func-prototype.yasnippet b/snippets/delphi-mode/func-prototype.yasnippet
new file mode 100644
index 0000000..2344f07
--- /dev/null
+++ b/snippets/delphi-mode/func-prototype.yasnippet
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# contributor: Alexander Sulfrian <alexander@sulfrian.net>
+# name: function prototype
+# key: func
+# condition: (delphi-in-class-definition)
+# --
+function ${1:Name$(upcase-initials text)}($2): $3;
+ $0$> \ No newline at end of file
diff --git a/snippets/delphi-mode/func.yasnippet b/snippets/delphi-mode/func.yasnippet
new file mode 100644
index 0000000..31fe413
--- /dev/null
+++ b/snippets/delphi-mode/func.yasnippet
@@ -0,0 +1,10 @@
+# -*- mode: snippet -*-
+# contributor: Alexander Sulfrian <alexander@sulfrian.net>
+# name: function
+# key: func
+# condition: (not (delphi-in-class-definition))
+# --
+function ${1:$$(yas/choose-value (let (value) (dolist (element (delphi-get-classes) value) (setq value (cons (concat element ".") value)))))}${2:Name$(upcase-initials text)}($3): $4;
+begin
+$0
+end; \ No newline at end of file
diff --git a/snippets/delphi-mode/if ... end.yasnippet b/snippets/delphi-mode/if ... end.yasnippet
new file mode 100644
index 0000000..030bb7f
--- /dev/null
+++ b/snippets/delphi-mode/if ... end.yasnippet
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# contributor: Alexander Sulfrian <alexander@sulfrian.net>
+# name: if ... end
+# key: if
+# --
+if $1 then
+begin
+$0
+end; \ No newline at end of file
diff --git a/snippets/delphi-mode/procedure-prototype.yasnippet b/snippets/delphi-mode/procedure-prototype.yasnippet
new file mode 100644
index 0000000..3c1d8cb
--- /dev/null
+++ b/snippets/delphi-mode/procedure-prototype.yasnippet
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# contributor: Alexander Sulfrian <alexander@sulfrian.net>
+# name: procedure prototype
+# key: proc
+# condition: (delphi-in-class-definition)
+# --
+procedure ${1:Name$(upcase-initials text)}($2);
+ $0$> \ No newline at end of file
diff --git a/snippets/delphi-mode/procedure.yasnippet b/snippets/delphi-mode/procedure.yasnippet
new file mode 100644
index 0000000..6039ad8
--- /dev/null
+++ b/snippets/delphi-mode/procedure.yasnippet
@@ -0,0 +1,10 @@
+# -*- mode: snippet -*-
+# contributor: Alexander Sulfrian <alexander@sulfrian.net>
+# name: procedure
+# key: proc
+# condition: (not (delphi-in-class-definition))
+# --
+procedure ${1:$$(yas/choose-value (let (value) (dolist (element (delphi-get-classes) value) (setq value (cons (concat element ".") value)))))}${2:Name$(upcase-initials text)}($3);
+begin
+$0
+end; \ No newline at end of file
diff --git a/snippets/delphi-mode/try ... finally.yasnippet b/snippets/delphi-mode/try ... finally.yasnippet
new file mode 100644
index 0000000..9a33d5f
--- /dev/null
+++ b/snippets/delphi-mode/try ... finally.yasnippet
@@ -0,0 +1,10 @@
+# -*- mode: snippet -*-
+# contributor: Alexander Sulfrian <alexander@sulfrian.net>
+# name: try ... finally
+# key: try
+# --
+try
+$0
+finally
+$1
+end; \ No newline at end of file
diff --git a/snippets/erlang-mode/inc.lib b/snippets/erlang-mode/inc.lib
new file mode 100644
index 0000000..09a6723
--- /dev/null
+++ b/snippets/erlang-mode/inc.lib
@@ -0,0 +1,4 @@
+#name : -include_lib("...").
+# --
+-include_lib("$1").
+$0
diff --git a/snippets/text-mode/email b/snippets/text-mode/email
new file mode 100644
index 0000000..1ac7f94
--- /dev/null
+++ b/snippets/text-mode/email
@@ -0,0 +1,3 @@
+#name : (user's email)
+# --
+`(replace-regexp-in-string "@" "@NOSPAM." user-mail-address)` \ No newline at end of file
diff --git a/snippets/text-mode/time b/snippets/text-mode/time
new file mode 100644
index 0000000..d744f1a
--- /dev/null
+++ b/snippets/text-mode/time
@@ -0,0 +1,3 @@
+#name : (current time)
+# --
+`(current-time-string)` \ No newline at end of file