]> git.rmz.io Git - dotfiles.git/blob - vim/ultisnips/c.snippets
Makefile: add target for git
[dotfiles.git] / vim / ultisnips / c.snippets
1 snippet once "Include header once only guard"
2 #ifndef ${1:`!p snip.rv = re.sub(r'[^A-Za-z0-9]+','_', snip.fn).upper()`}
3 #define $1
4
5 ${VISUAL}${0}
6
7 #endif // $1
8 endsnippet
9
10 snippet for "for loop (for)"
11 for (${2:i} = 0; $2 < ${1:count}; ${3:++$2}) {
12 ${VISUAL}${0}
13 }
14 endsnippet
15
16 snippet if "if .. (if)"
17 if (${1:/* condition */}) {
18 ${VISUAL}${0}
19 }
20 endsnippet
21
22 snippet ife "if .. else (ife)"
23 if (${1:/* condition */}) {
24 ${2}
25 } else {
26 ${3:/* else */}
27 }
28 endsnippet