summaryrefslogtreecommitdiffstats
path: root/snippets/delphi-mode/func.yasnippet
diff options
context:
space:
mode:
Diffstat (limited to 'snippets/delphi-mode/func.yasnippet')
-rw-r--r--snippets/delphi-mode/func.yasnippet10
1 files changed, 10 insertions, 0 deletions
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