# -*- mode: snippet -*- # key: sub # contributor: Translated from TextMate Snippet # name: sub(/../) { |match| .. } ## condition: "source.ruby" # -- sub(/${1:pattern}/) { ${2/(^(?\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g)*,?\s*$)|.*/(?1:|)/}${2:match}${2/(^(?\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g)*,?\s*$)|.*/(?1:| )/}$0 }