mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23:04 +00:00
7 lines
339 B
Plaintext
7 lines
339 B
Plaintext
# -*- mode: snippet -*-
|
|
# key: fet
|
|
# contributor: Translated from TextMate Snippet
|
|
# name: fetch(name) { |key| .. }
|
|
## condition: "source.ruby"
|
|
# --
|
|
fetch(${1:name}) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:key}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 } |