PageRenderTime 122ms CodeModel.GetById 60ms app.highlight 1ms RepoModel.GetById 60ms app.codeStats 0ms

/ruby-mode/Counting/times { |n| .. } (tim).yasnippet

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