summaryrefslogtreecommitdiffstats
path: root/lua/core/snippets/c.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/core/snippets/c.lua')
-rw-r--r--lua/core/snippets/c.lua29
1 files changed, 0 insertions, 29 deletions
diff --git a/lua/core/snippets/c.lua b/lua/core/snippets/c.lua
deleted file mode 100644
index c45f556..0000000
--- a/lua/core/snippets/c.lua
+++ /dev/null
@@ -1,29 +0,0 @@
-ls.add_snippets('c', {
- s('trip', {
- -- cond ? then : else statment
- i(1, 'cond'), t(' ? '), i(2, 'then'), t(' : '), i(3, 'else')
- }),
- s('stdlibs', {
- -- cond ? then : else statment
- t('#include <stdio.h>'),
- t({'', '#include <stdlib.h>'})
- }),
- s('die', {
- t({
- 'void die(const char *fmt, ...) {', '',
- 'va_list ap;',
- '',
- 'va_start(ap, fmt);',
- 'vfprintf(stderr, fmt, ap);',
- 'va_end(ap);',
- '',
- [[if (fmt[0] && fmt[strlen(fmt)-1] == ':') {]],
- [[ fputc(' ', stderr);]],
- ' perror(NULL);',
- '} else',
- [[ fputc('\n', stderr);]],
- ' exit(1);',
- '}',
- })
- })
-})