mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-15 18:04:18 +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: Array
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Array.new(10) { |i| .. }
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
Array.new(${1:10}) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:i}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }
|
||||
Array.new(${1:10}) { ${2:$(if (string= yas/text "") "" "|")}${2:i}${2:$(if (string= yas/text "") "" "|")} $0 }
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: deli
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: delete_if { |e| .. }
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
delete_if { |${1:e}| $0 }
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: fil
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: fill(range) { |i| .. }
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
fill(${1:range}) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:i}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }
|
||||
fill(${1:range}) { ${2:$(if (string= yas/text "") "" "|")}${2:variable}${2:$(if (string= yas/text "") "" "|")} $0 }
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: flao
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: flatten_once()
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
inject(Array.new) { |${1:arr}, ${2:a}| ${1:arr}.push(*${2:a}) }
|
||||
inject(Array.new) { | ${1:arr}, ${2:a}| $1.push(*$2) }
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: zip
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: zip(enums) { |row| .. }
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
zip(${1:enums}) { |${2:row}| $0 }
|
||||
Reference in New Issue
Block a user