/ruby-mode/Files/File_open("__") { |file| __ }.yasnippet
http://github.com/ridgetang/snippets · Unknown · 6 lines · 6 code · 0 blank · 0 comment · 0 complexity · 871ce24e7d1043cb665ce98521861813 MD5 · raw file
- # -*- mode: snippet -*-
- # key: File
- # contributor: Translated from TextMate Snippet
- # name: File.open("..") { |file| .. }
- # --
- File.open(${1:"${2:path/to/file}"}${3/(^[rwab+]+$)|.*/(?1:, ")/}${3:w}${3/(^[rwab+]+$)|.*/(?1:")/}) { |${4:file}| $0 }