From dd58c6cf66c9445d5439ae02d5f4daee08b55ef1 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 8 Jul 2015 15:14:14 +0200 Subject: [PATCH] Add some snippets --- emacs/.emacs.d/snippets/emacs-lisp-mode/depends-on | 5 +++++ .../snippets/{emacs-lisp => emacs-lisp-mode}/face | 2 +- emacs/.emacs.d/snippets/nxml-mode/pencil-property | 7 +++++++ emacs/.emacs.d/snippets/nxml-mode/pencil-property-value | 5 +++++ emacs/.emacs.d/snippets/nxml-mode/pencil-shortcut | 9 +++++++++ emacs/.emacs.d/snippets/ruby-mode/describe | 7 +++++++ emacs/.emacs.d/snippets/ruby-mode/fill_in | 5 +++++ emacs/.emacs.d/snippets/ruby-mode/reduce | 5 +++++ 8 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 emacs/.emacs.d/snippets/emacs-lisp-mode/depends-on rename emacs/.emacs.d/snippets/{emacs-lisp => emacs-lisp-mode}/face (89%) create mode 100644 emacs/.emacs.d/snippets/nxml-mode/pencil-property create mode 100644 emacs/.emacs.d/snippets/nxml-mode/pencil-property-value create mode 100644 emacs/.emacs.d/snippets/nxml-mode/pencil-shortcut create mode 100644 emacs/.emacs.d/snippets/ruby-mode/describe create mode 100644 emacs/.emacs.d/snippets/ruby-mode/fill_in create mode 100644 emacs/.emacs.d/snippets/ruby-mode/reduce diff --git a/emacs/.emacs.d/snippets/emacs-lisp-mode/depends-on b/emacs/.emacs.d/snippets/emacs-lisp-mode/depends-on new file mode 100644 index 0000000..4f99d92 --- /dev/null +++ b/emacs/.emacs.d/snippets/emacs-lisp-mode/depends-on @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: depends-on +# key: do +# -- +(depends-on "$1")$0 \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/emacs-lisp/face b/emacs/.emacs.d/snippets/emacs-lisp-mode/face similarity index 89% rename from emacs/.emacs.d/snippets/emacs-lisp/face rename to emacs/.emacs.d/snippets/emacs-lisp-mode/face index 0a13b99..9fdbbb2 100644 --- a/emacs/.emacs.d/snippets/emacs-lisp/face +++ b/emacs/.emacs.d/snippets/emacs-lisp-mode/face @@ -1,5 +1,5 @@ # -*- mode: snippet; require-final-newline: nil -*- # name: face -# key: f +# key: face # -- `($1 ((t (${2::foreground} $0)))) \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/nxml-mode/pencil-property b/emacs/.emacs.d/snippets/nxml-mode/pencil-property new file mode 100644 index 0000000..7fafcb8 --- /dev/null +++ b/emacs/.emacs.d/snippets/nxml-mode/pencil-property @@ -0,0 +1,7 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: PencilProperty +# key: p +# -- +$4 \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/nxml-mode/pencil-property-value b/emacs/.emacs.d/snippets/nxml-mode/pencil-property-value new file mode 100644 index 0000000..5da3d10 --- /dev/null +++ b/emacs/.emacs.d/snippets/nxml-mode/pencil-property-value @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: PropertyValue +# key: pv +# -- +$2 \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/nxml-mode/pencil-shortcut b/emacs/.emacs.d/snippets/nxml-mode/pencil-shortcut new file mode 100644 index 0000000..e760d27 --- /dev/null +++ b/emacs/.emacs.d/snippets/nxml-mode/pencil-shortcut @@ -0,0 +1,9 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: Shortcut +# key: s +# -- + + $0 + \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/ruby-mode/describe b/emacs/.emacs.d/snippets/ruby-mode/describe new file mode 100644 index 0000000..acd3a6b --- /dev/null +++ b/emacs/.emacs.d/snippets/ruby-mode/describe @@ -0,0 +1,7 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: describe +# key: desc +# -- +describe '$1' do + $0 +end \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/ruby-mode/fill_in b/emacs/.emacs.d/snippets/ruby-mode/fill_in new file mode 100644 index 0000000..854b029 --- /dev/null +++ b/emacs/.emacs.d/snippets/ruby-mode/fill_in @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: fill_in +# key: fin +# -- +fill_in '$1', with: $2 \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/ruby-mode/reduce b/emacs/.emacs.d/snippets/ruby-mode/reduce new file mode 100644 index 0000000..3d4bfe4 --- /dev/null +++ b/emacs/.emacs.d/snippets/ruby-mode/reduce @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: reduce +# key: reduce +# -- +reduce { |a, e| $0 } \ No newline at end of file