mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-16 10:24:18 +00:00
Files ruby-mode snippets updated to work with yasnippet.
This commit is contained in:
@@ -4,4 +4,4 @@
|
||||
# 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 }
|
||||
open(${1:"${2:path/or/url/or/pipe}"}${3:$(if (string-match "^[rwab+]+$" yas/text) ", '" "")}${3:w}${3:$(if (string-match "^[rwab+]+$" yas/text) "'" "")}) { |${4:io}| $0 }
|
||||
Reference in New Issue
Block a user