mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-15 09:54:17 +00:00
Last commit before tagging and releasing
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: Md
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Marshal.dump(.., file)
|
||||
# --
|
||||
File.open(${1:"${2:path/to/file}.dump"}, "wb") { |${3:file}| Marshal.dump(${4:obj}, ${3:file}) }
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: Ml
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Marshal.load(obj)
|
||||
# --
|
||||
File.open(${1:"${2:path/to/file}.dump"}, "rb") { |${3:file}| Marshal.load(${3:file}) }
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: Pn-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: PStore.new( .. )
|
||||
# --
|
||||
PStore.new(${1:"${2:file_name.pstore}"})
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: Yd-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: YAML.dump(.., file)
|
||||
# --
|
||||
File.open(${1:"${2:path/to/file}.yaml"}, "w") { |${3:file}| YAML.dump(${4:obj}, ${3:file}) }
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: Yl-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: YAML.load(file)
|
||||
# --
|
||||
File.open(${1:"${2:path/to/file}.yaml"}) { |${3:file}| YAML.load(${3:file}) }
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: tra
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: transaction( .. ) { .. }
|
||||
# --
|
||||
transaction${1/(^.*?\S.*)|.*/(?1:\()/}${1:true}${1/(^.*?\S.*)|.*/(?1:\))/} { $0 }
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: xml-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: xmlread(..)
|
||||
# --
|
||||
REXML::Document.new(File.read(${1:"${2:path/to/file}"}))
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: xpa
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: xpath(..) { .. }
|
||||
# --
|
||||
elements.each(${1:"${2://XPath}"}) do |${3:node}|
|
||||
$0
|
||||
end
|
||||
Reference in New Issue
Block a user