/plugins/yasnippet/extras/imported/ruby-mode/Strings/gsub(;..;) { |match| .. } (gsu).yasnippet
Unknown | 7 lines | 7 code | 0 blank | 0 comment | 0 complexity | 86230423544a150e6081b91dd2a8c5ec MD5 | raw file
Possible License(s): GPL-2.0
- # -*- mode: snippet -*-
- # key: gsu
- # contributor: Translated from TextMate Snippet
- # name: gsub(/../) { |match| .. }
- ## condition: "source.ruby"
- # --
- gsub(/${1:pattern}/) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:match}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }