mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-18 11:14:17 +00:00
Files ruby-mode snippets updated to work with yasnippet.
This commit is contained in:
@@ -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 }
|
||||
Reference in New Issue
Block a user