From: Shawn M Moore Date: Sun, 10 May 2009 19:44:26 +0000 (-0400) Subject: Fixes for extends and RemoveEmptySuperClass X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4c82fd0d877189023ee399feda4d75d405bfd124;p=gitmo%2Fmoose-dev-utils.git Fixes for extends and RemoveEmptySuperClass --- diff --git a/vim/moose_snippets.vim b/vim/moose_snippets.vim index d69c740..5b97d8d 100644 --- a/vim/moose_snippets.vim +++ b/vim/moose_snippets.vim @@ -6,7 +6,11 @@ if !exists('loaded_snippet') || &cp endif function! RemoveEmptySuperClass() - s/^extends '<{}>';\n//e + if @z == "SuperClass" + s/extends '<{}>';\n\n//e + return "" + endif + return @z endfun @@ -38,7 +42,7 @@ call Snippet('class', [ \"package <{ClassName}>;", \"use Moose;", \"", - \"extends '<{SuperClass:RemoveEmptySuperClass()}>;", + \"extends '<{SuperClass:RemoveEmptySuperClass()}>';", \"", \"<{}>", \"",