yasnippet/extras/imported/ruby-mode/Files/open(pathorurl, w) do doc .. end (ope).yasnippet

7 lines
279 B
Plaintext

# -*- mode: snippet -*-
# key: ope
# contributor: Translated from TextMate Snippet
# 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 }