PageRenderTime 6ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/ruby-mode/Arrays/fill(range) { |i| .. } (fil).yasnippet

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