diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2009-12-15 11:31:46 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2009-12-15 11:31:46 +0100 |
commit | f19dd70ece015509d52d0e9a7c113ccccad96e0e (patch) | |
tree | eebab916ce289db804fbfd752b0d542634a78ff0 /emacs.d/snippets | |
parent | 776ec04db322b4a254c4a19a3c4f1dff73b86dd2 (diff) | |
download | dotfiles-f19dd70ece015509d52d0e9a7c113ccccad96e0e.tar.gz dotfiles-f19dd70ece015509d52d0e9a7c113ccccad96e0e.tar.xz dotfiles-f19dd70ece015509d52d0e9a7c113ccccad96e0e.zip |
added winring with ecb-compatibility, more delphi-mode improvments
Diffstat (limited to 'emacs.d/snippets')
10 files changed, 55 insertions, 6 deletions
diff --git a/emacs.d/snippets/delphi-mode/begin ... end.yasnippet b/emacs.d/snippets/delphi-mode/begin ... end.yasnippet new file mode 100644 index 0000000..5b02ee0 --- /dev/null +++ b/emacs.d/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/emacs.d/snippets/delphi-mode/class (class).yasnippet b/emacs.d/snippets/delphi-mode/class (class).yasnippet new file mode 100644 index 0000000..a0d8b46 --- /dev/null +++ b/emacs.d/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/emacs.d/snippets/delphi-mode/constructor, destructor.yasnippet b/emacs.d/snippets/delphi-mode/constructor, destructor.yasnippet new file mode 100644 index 0000000..33a52ed --- /dev/null +++ b/emacs.d/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/emacs.d/snippets/delphi-mode/for ... end.yasnippet b/emacs.d/snippets/delphi-mode/for ... end.yasnippet new file mode 100644 index 0000000..5353d53 --- /dev/null +++ b/emacs.d/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/emacs.d/snippets/delphi-mode/func-prototype.yasnippet b/emacs.d/snippets/delphi-mode/func-prototype.yasnippet index 25f06bb..cae55d7 100644 --- a/emacs.d/snippets/delphi-mode/func-prototype.yasnippet +++ b/emacs.d/snippets/delphi-mode/func-prototype.yasnippet @@ -3,7 +3,6 @@ # name: function prototype # key: func # condition: (delphi-in-class-definition) -# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 'nil) (yas/also-auto-indent-first-line 't)) # -- function ${1:Name$(capitalize text)}($2): $3; $0
\ No newline at end of file diff --git a/emacs.d/snippets/delphi-mode/func.yasnippet b/emacs.d/snippets/delphi-mode/func.yasnippet index dc38597..a42a598 100644 --- a/emacs.d/snippets/delphi-mode/func.yasnippet +++ b/emacs.d/snippets/delphi-mode/func.yasnippet @@ -3,9 +3,8 @@ # name: function # key: func # condition: (not (delphi-in-class-definition)) -# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 'nil) (yas/also-auto-indent-first-line 't)) # -- -function ${1:Name$(capitalize text)}($2): $3; +function ${1:$$(yas/choose-value (let (value) (dolist (element (delphi-get-classes) value) (setq value (cons (concat element ".") value)))))}${2:Name$(capitalize text)}($3): $4; begin $0 end;
\ No newline at end of file diff --git a/emacs.d/snippets/delphi-mode/if ... end.yasnippet b/emacs.d/snippets/delphi-mode/if ... end.yasnippet new file mode 100644 index 0000000..030bb7f --- /dev/null +++ b/emacs.d/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/emacs.d/snippets/delphi-mode/procedure-prototype.yasnippet b/emacs.d/snippets/delphi-mode/procedure-prototype.yasnippet index ee5b101..09927ac 100644 --- a/emacs.d/snippets/delphi-mode/procedure-prototype.yasnippet +++ b/emacs.d/snippets/delphi-mode/procedure-prototype.yasnippet @@ -3,7 +3,6 @@ # name: procedure prototype # key: proc # condition: (delphi-in-class-definition) -# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 'nil) (yas/also-auto-indent-first-line 't)) # -- procedure ${1:Name$(capitalize text)}($2); $0
\ No newline at end of file diff --git a/emacs.d/snippets/delphi-mode/procedure.yasnippet b/emacs.d/snippets/delphi-mode/procedure.yasnippet index 8834d8c..9e3a08e 100644 --- a/emacs.d/snippets/delphi-mode/procedure.yasnippet +++ b/emacs.d/snippets/delphi-mode/procedure.yasnippet @@ -3,9 +3,8 @@ # name: procedure # key: proc # condition: (not (delphi-in-class-definition)) -# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 'nil) (yas/also-auto-indent-first-line 't)) # -- -procedure ${1:Name$(capitalize text)}($2); +procedure ${1:$$(yas/choose-value (let (value) (dolist (element (delphi-get-classes) value) (setq value (cons (concat element ".") value)))))}${2:Name$(capitalize text)}($3); begin $0 end;
\ No newline at end of file diff --git a/emacs.d/snippets/delphi-mode/try ... finally.yasnippet b/emacs.d/snippets/delphi-mode/try ... finally.yasnippet new file mode 100644 index 0000000..9a33d5f --- /dev/null +++ b/emacs.d/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 |