Ver Fonte

added c snippets for else and if else and stuff

wreed4 há 10 anos atrás
pai
commit
4ed3773360
1 ficheiros alterados com 15 adições e 1 exclusões
  1. 15 1
      UltiSnips/c.snippets

+ 15 - 1
UltiSnips/c.snippets

@@ -21,7 +21,21 @@ endsnippet
 snippet if "if (cond){ ... }"
 if (${1:cond}){
 	${2}
-}${0}
+} ${0}
+endsnippet
+
+snippet ife "if (cond){ ... } else { ... }"
+if (${1:cond}){
+	${2}
+} else {
+	${3}
+} ${0}
+endsnippet
+
+snippet el "else { ... }"
+else {
+	${3}
+} ${0}
 endsnippet