Improved ruby snip.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user