From: Shawn M Moore Date: Tue, 5 May 2009 17:50:55 +0000 (-0400) Subject: Avoid function redefined warnings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2Fmoose-dev-utils.git;a=commitdiff_plain;h=f93358a2f9a3bca29868c74af9f3dff56ff8cf6d Avoid function redefined warnings --- diff --git a/vim/moose_snippets.vim b/vim/moose_snippets.vim index 4f9a8c1..50aa99f 100644 --- a/vim/moose_snippets.vim +++ b/vim/moose_snippets.vim @@ -5,17 +5,17 @@ if !exists('loaded_snippet') || &cp finish endif -function RemoveEmptySuperClass() +function! RemoveEmptySuperClass() s/^extends '<{}>';\n//e return @z endfun -function RemoveEmptyLine() +function! RemoveEmptyLine() s/^\s*<{}>\s*\n//e return @z endfun -function Snippet(abbr, str) +function! Snippet(abbr, str) if type(a:str) == type([]) return Snippet(a:abbr, join(a:str, "\n")) endif @@ -28,7 +28,7 @@ function Snippet(abbr, str) exec 'Snippet '.a:abbr.' '.str endfunction -function SnippetFile(filename) +function! SnippetFile(filename) let abbr = fnamemodify(a:filename, ':t:r') let str = readfile(a:filename) return Snippet(abbr, str)