summaryrefslogtreecommitdiff
path: root/.config/nvim/snippets/c.json
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/snippets/c.json')
-rw-r--r--.config/nvim/snippets/c.json19
1 files changed, 19 insertions, 0 deletions
diff --git a/.config/nvim/snippets/c.json b/.config/nvim/snippets/c.json
new file mode 100644
index 0000000..abed0f2
--- /dev/null
+++ b/.config/nvim/snippets/c.json
@@ -0,0 +1,19 @@
+{
+ "header_guard": {
+ "prefix": "header_guard",
+ "body": [
+ "#ifndef _$1_H_",
+ "#define _$1_H_",
+ "$0",
+ "#endif"
+ ]
+ },
+ "function": {
+ "prefix": "function",
+ "body": [
+ "$1 $2($3) {",
+ " $0",
+ "}"
+ ],
+ }
+}