diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-04-24 23:29:38 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2012-04-24 23:29:38 +0200 |
commit | 7a6bb0f05e349068b0a89514f1da33d6d7de30a9 (patch) | |
tree | c202b81dfaf524e71e881c15aa509c45445a64b3 /emacs.d/lisp/yasnippet/snippets/ruby-mode/general | |
parent | 66b95ab46d870f41c12c489eb21c9c82846d6112 (diff) | |
download | dotfiles-7a6bb0f05e349068b0a89514f1da33d6d7de30a9.tar.gz dotfiles-7a6bb0f05e349068b0a89514f1da33d6d7de30a9.tar.xz dotfiles-7a6bb0f05e349068b0a89514f1da33d6d7de30a9.zip |
emacs.d/lisp/yasnippet: added yasnippet
Diffstat (limited to 'emacs.d/lisp/yasnippet/snippets/ruby-mode/general')
10 files changed, 39 insertions, 0 deletions
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 |