aboutsummaryrefslogtreecommitdiffstats
path: root/.vim/snippets/c.snippets
blob: ff06931940d2153d4a516ea77eba09fe0d93e972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
snippet main
	int main(int argc, char *argv[])
	{
		${0}
	}

snippet in
	#include <${1:stdio}.h>
	$0

snippet ndef
	#ifndef ${1:`toupper(vim_snippets#Filename('$1_H', 'UNTITLED_H'))`}
	#define $1

	${0}

	#endif /* end of include guard: $1 */

snippet if
	if (${1:true}) {
		${0:${VISUAL}}
	}

snippet elif
	else if (${1:true}) {
		${0:${VISUAL}}
	}

snippet switch
	switch (${1:/* variable */}) {
		${0:${VISUAL}}
	}

snippet for
	for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {
		${4}
	}

snippet while
	while (${1:1}) {
		${0:${VISUAL}}
	}