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: File.open("..") { |file| .. }
## condition: "source.ruby"
# --
File.open(${1:"${2:path/to/file}"}${3/(^[rwab+]+$)|.*/(?1:, ")/}${3:w}${3/(^[rwab+]+$)|.*/(?1:")/}) { |${4:file}| $0 }
File.open(${1:"${2:path/to/file}"}${3:$(if (string-match "^[rwab+]+$" yas/text) ", '" "")}${3:w}${3:$(if (string-match "^[rwab+]+$" yas/text) "'" "")}) { |${4:file}| $0 }