From 7a6bb0f05e349068b0a89514f1da33d6d7de30a9 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 24 Apr 2012 23:29:38 +0200 Subject: emacs.d/lisp/yasnippet: added yasnippet --- emacs.d/lisp/yasnippet/snippets/ruby-mode/general/# | 3 +++ emacs.d/lisp/yasnippet/snippets/ruby-mode/general/=b | 5 +++++ emacs.d/lisp/yasnippet/snippets/ruby-mode/general/app | 5 +++++ emacs.d/lisp/yasnippet/snippets/ruby-mode/general/bm | 5 +++++ emacs.d/lisp/yasnippet/snippets/ruby-mode/general/case | 6 ++++++ emacs.d/lisp/yasnippet/snippets/ruby-mode/general/dee | 3 +++ emacs.d/lisp/yasnippet/snippets/ruby-mode/general/rb | 3 +++ emacs.d/lisp/yasnippet/snippets/ruby-mode/general/req | 3 +++ emacs.d/lisp/yasnippet/snippets/ruby-mode/general/rreq | 3 +++ emacs.d/lisp/yasnippet/snippets/ruby-mode/general/y | 3 +++ 10 files changed, 39 insertions(+) create mode 100644 emacs.d/lisp/yasnippet/snippets/ruby-mode/general/# create mode 100644 emacs.d/lisp/yasnippet/snippets/ruby-mode/general/=b create mode 100644 emacs.d/lisp/yasnippet/snippets/ruby-mode/general/app create mode 100644 emacs.d/lisp/yasnippet/snippets/ruby-mode/general/bm create mode 100644 emacs.d/lisp/yasnippet/snippets/ruby-mode/general/case create mode 100644 emacs.d/lisp/yasnippet/snippets/ruby-mode/general/dee create mode 100644 emacs.d/lisp/yasnippet/snippets/ruby-mode/general/rb create mode 100644 emacs.d/lisp/yasnippet/snippets/ruby-mode/general/req create mode 100644 emacs.d/lisp/yasnippet/snippets/ruby-mode/general/rreq create mode 100644 emacs.d/lisp/yasnippet/snippets/ruby-mode/general/y (limited to 'emacs.d/lisp/yasnippet/snippets/ruby-mode/general') diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/# b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/# new file mode 100644 index 0000000..b9e3f8a --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/# @@ -0,0 +1,3 @@ +#name : # => +# -- +# => diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/=b b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/=b new file mode 100644 index 0000000..e396723 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/=b @@ -0,0 +1,5 @@ +#name : =begin rdoc ... =end +# -- +=begin rdoc + $0 +=end diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/app b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/app new file mode 100644 index 0000000..b151ccc --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/app @@ -0,0 +1,5 @@ +#name : if __FILE__ == $PROGRAM_NAME ... end +# -- +if __FILE__ == $PROGRAM_NAME + $0 +end diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/bm b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/bm new file mode 100644 index 0000000..44fb2b6 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/bm @@ -0,0 +1,5 @@ +#name : Benchmark.bmbm(...) do ... end +# -- +Benchmark.bmbm(${1:10}) do |x| + $0 +end diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/case b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/case new file mode 100644 index 0000000..b919081 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/case @@ -0,0 +1,6 @@ +#name : case ... end +# -- +case ${1:object} +when ${2:condition} + $0 +end diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/dee b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/dee new file mode 100644 index 0000000..496e187 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/dee @@ -0,0 +1,3 @@ +#name : deep_copy(...) +# -- +Marshal.load(Marshal.dump($0)) diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/rb b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/rb new file mode 100644 index 0000000..9153653 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/rb @@ -0,0 +1,3 @@ +#name : /usr/bin/ruby -wKU +# -- +#!/usr/bin/ruby -wKU diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/req b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/req new file mode 100644 index 0000000..3ada7d5 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/req @@ -0,0 +1,3 @@ +#name : require "..." +# -- +require "$0" diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/rreq b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/rreq new file mode 100644 index 0000000..ff80c71 --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/rreq @@ -0,0 +1,3 @@ +#name : require File.join(File.dirname(__FILE__), ...) +# -- +require File.join(File.dirname(__FILE__), $0) diff --git a/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/y b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/y new file mode 100644 index 0000000..a57fbde --- /dev/null +++ b/emacs.d/lisp/yasnippet/snippets/ruby-mode/general/y @@ -0,0 +1,3 @@ +#name : :yields: arguments (rdoc) +# -- +:yields: $0 -- cgit v1.2.3