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

/ruby-mode/Counting/downto(0) { |n| .. } (dow).yasnippet

http://github.com/ridgetang/snippets
Unknown | 6 lines | 6 code | 0 blank | 0 comment | 0 complexity | ed0c1845429f517ec8e5f327fbd77f88 MD5 | raw file
  1. # -*- mode: snippet -*-
  2. # key: dow
  3. # contributor: Translated from TextMate Snippet
  4. # name: downto(0) { |n| .. }
  5. # --
  6. downto(${1:0}) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:n}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }