/ruby-mode/Counting/upto(1.0;0.0) { |n| .. } (upt).yasnippet

http://github.com/ridgetang/snippets · Unknown · 6 lines · 6 code · 0 blank · 0 comment · 0 complexity · 8c3ab34d269f2002d3b330e380f632be MD5 · raw file

  1. # -*- mode: snippet -*-
  2. # key: upt
  3. # contributor: Translated from TextMate Snippet
  4. # name: upto(1.0/0.0) { |n| .. }
  5. # --
  6. upto(${1:1.0/0.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 }