From 13d34ada5d1f036097fedd9bd4cff4effb9cf135 Mon Sep 17 00:00:00 2001 From: ujihisa Date: Tue, 18 Jun 2013 17:11:45 -0700 Subject: [PATCH] Improved ruby snip. --- autoload/neosnippet/snippets/ruby.snip | 14 +++++++++++++- doc/neosnippet.txt | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/autoload/neosnippet/snippets/ruby.snip b/autoload/neosnippet/snippets/ruby.snip index 84f192c..04159cc 100644 --- a/autoload/neosnippet/snippets/ruby.snip +++ b/autoload/neosnippet/snippets/ruby.snip @@ -116,5 +116,17 @@ options word snippet main options head if __FILE__ == \$0 - ${1:TARGET} + ${0:TARGET} end + +# This idiom is only for legacy ruby such as 1.9.3 +snippet filedir-legacy-compatibility +alias __dir__ +abbr File.dirname(...) + File.dirname(File.expand_path(__FILE__)) + +snippet glob +options head + Dir.glob(${1:'**/*'}) do |fname| + ${0:TARGET} + end diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 7820251..af19bd5 100755 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -722,6 +722,9 @@ A: You can use |:NeoSnippetSource| for it. ============================================================================== CHANGELOG *neosnippet-changelog* +2013-06-18 +- Improved ruby snip. + 2013-06-16 - Added groovy snip.