mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-17 02:44:17 +00:00
* Small change to textmate_import.rb to import (commented) "scope" directive
* Reimported the HTML and Ruby bundle with the previous fix * Applied Rob Christie's patches of issues 109 and 110 0001-Deleted-because-this-is-supported-via-dwim-with-rcod.patch 0002-Updated-snippets.patch 0003-Added-setup.el-file-that-must-be-loaded-prior-to-loa.patch 0004-ruby-mode-class-and-module-snippets-updated.patch 0005-changes-to-counting-snippets-and-some-declaration-sn.patch patching some things manually. Thanks a lot Rob!
This commit is contained in:
@@ -2,5 +2,6 @@
|
||||
# key: Dir
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Dir.glob("..") { |file| .. }
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
Dir.glob(${1:"${2:dir/glob/*}"}) { |${3:file}| $0 }
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: Dir
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Dir[".."]
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
Dir[${1:"${2:glob/**/*.rb}"}]
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: File
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: File.foreach ("..") { |line| .. }
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
File.foreach(${1:"${2:path/to/file}"}) { |${3:line}| $0 }
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: File
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: File.open("..") { |file| .. }
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
File.open(${1:"${2:path/to/file}"}${3/(^[rwab+]+$)|.*/(?1:, ")/}${3:w}${3/(^[rwab+]+$)|.*/(?1:")/}) { |${4:file}| $0 }
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: File
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: File.read("..")
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
File.read(${1:"${2:path/to/file}"})
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: dir
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: directory()
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
File.dirname(__FILE__)
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: ope
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: open("path/or/url", "w") { |io| .. }
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
open(${1:"${2:path/or/url/or/pipe}"}${3/(^[rwab+]+$)|.*/(?1:, ")/}${3:w}${3/(^[rwab+]+$)|.*/(?1:")/}) { |${4:io}| $0 }
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: optp
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: option_parse { .. }
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
require "optparse"
|
||||
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: patfh
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: path_from_here( .. )
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
File.join(File.dirname(__FILE__), *%w[${1:rel path here}])
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: unif
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: unix_filter { .. }
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
ARGF.each_line$1 do |${2:line}|
|
||||
$0
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: opt
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: option(..)
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
opts.on( "-${1:o}", "--${2:long-option-name}"${3/^\s*$|(.*\S.*)/(?1:, )/}${3:String},
|
||||
"${4:Option description.}" ) do |${6:opt}|
|
||||
|
||||
Reference in New Issue
Block a user