return @z
endfun
-function LazyBuilder()
- let pattern = "has\\s\\+\\zs.\\{-}\\ze\\s\\+=>"
- let lnum = search(pattern, 'bnW')
- return matchstr(getline(lnum), pattern)
-endfunction
-
function Snippet(abbr, str)
if type(a:str) == type([])
return Snippet(a:abbr, join(a:str, "\n"))
\ "<{}>",
\");",
\"",
- \"sub _build_<{attr:LazyBuilder()}> {",
+ \"sub _build_<{attr}> {",
\ "my $self = shift;",
\ "<{}>",
\"}"])