Files ruby-mode snippets updated to work with yasnippet.

This commit is contained in:
Rob Christie
2009-11-02 01:34:29 +00:00
parent 02408621e8
commit 32c837290d
4 changed files with 3 additions and 13 deletions

View File

@@ -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 }