From 4d642ddee3b18d60d31456bac7cd95513d3a260c Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Sat, 13 Oct 2012 12:11:50 +0200 Subject: [PATCH] ife snippet for C by theocrite --- UltiSnips/c.snippets | 12 +++++++++++- doc/UltiSnips.txt | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/UltiSnips/c.snippets b/UltiSnips/c.snippets index 532fe173..c92dbd7f 100644 --- a/UltiSnips/c.snippets +++ b/UltiSnips/c.snippets @@ -1,4 +1,3 @@ - ########################################################################### # TextMate Snippets # ########################################################################### @@ -88,6 +87,17 @@ if (${1:/* condition */}) } endsnippet +snippet ife "if .. else (ife)" +if (${1:/* condition */}) +{ + ${2:/* code */} +} +else +{ + ${3:/* else */} +} +endsnippet + snippet printf "printf .. (printf)" printf("${1:%s}\n"${1/([^%]|%%)*(%.)?.*/(?2:, :\);)/}$2${1/([^%]|%%)*(%.)?.*/(?2:\);)/} endsnippet diff --git a/doc/UltiSnips.txt b/doc/UltiSnips.txt index 4cd88314..6d14b4dd 100644 --- a/doc/UltiSnips.txt +++ b/doc/UltiSnips.txt @@ -1274,6 +1274,7 @@ Contributors listed in chronological order: Jacek Wysocki (exu) Alexander Kondratskiy (KholdStare) Martin Krauskopf (martin-krauskopf) + Theocrite (theocrite) Thank you for your support.