Fixes for extends and RemoveEmptySuperClass
Shawn M Moore [Sun, 10 May 2009 19:44:26 +0000 (15:44 -0400)]
vim/moose_snippets.vim

index d69c740..5b97d8d 100644 (file)
@@ -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()}>';",
             \"",
             \"<{}>",
             \"",