aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2025-12-25 14:28:43 +0500
committerAnton Bobov <anton@bobov.name>2025-12-25 14:28:50 +0500
commita55a64a8462a99fcd283743343184f669d9c3520 (patch)
tree1a2e4cc578ca2afc2b8ca4fad3cfa488ae8f1b8b /files
parentd7f83de7eb30c82b8a8c97030e6d7c76788f02b5 (diff)
vim: add argc template and snippet
Diffstat (limited to 'files')
-rw-r--r--files/.vim/UltiSnips/sh.snippets11
-rwxr-xr-xfiles/.vim/templates/=template=.argc-sh11
2 files changed, 22 insertions, 0 deletions
diff --git a/files/.vim/UltiSnips/sh.snippets b/files/.vim/UltiSnips/sh.snippets
index f0df521..d9087eb 100644
--- a/files/.vim/UltiSnips/sh.snippets
+++ b/files/.vim/UltiSnips/sh.snippets
@@ -78,3 +78,14 @@ main() {
main "$@"
endsnippet
+
+snippet argc_snip "new argc template"
+# @describe
+# Specification: https://github.com/sigoden/argc/blob/main/docs/specification.md
+
+main() {
+ $0
+}
+
+eval "$(argc --argc-eval "$0" "$@")"
+endsnippet
diff --git a/files/.vim/templates/=template=.argc-sh b/files/.vim/templates/=template=.argc-sh
new file mode 100755
index 0000000..0ce19ab
--- /dev/null
+++ b/files/.vim/templates/=template=.argc-sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+# @describe
+
+main() {
+
+}
+
+eval "$(argc --argc-eval "$0" "$@")"