PageRenderTime 40ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/plugins/yasnippet/extras/imported/ruby-mode/Strings/gsub(;..;) { |match| .. } (gsu).yasnippet

http://github.com/spastorino/my_emacs_for_rails
Unknown | 7 lines | 7 code | 0 blank | 0 comment | 0 complexity | 86230423544a150e6081b91dd2a8c5ec MD5 | raw file
Possible License(s): GPL-2.0
  1. # -*- mode: snippet -*-
  2. # key: gsu
  3. # contributor: Translated from TextMate Snippet
  4. # name: gsub(/../) { |match| .. }
  5. ## condition: "source.ruby"
  6. # --
  7. 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 }