]> git.sthu.org Git - vimconf.git/commitdiff
snippets: Reorga and add latex snippets
authorStefan Huber <shuber@sthu.org>
Wed, 16 Apr 2025 10:15:49 +0000 (12:15 +0200)
committerStefan Huber <shuber@sthu.org>
Wed, 16 Apr 2025 10:15:49 +0000 (12:15 +0200)
snippets/latex.json [deleted file]
snippets/latex/beamer.json [new file with mode: 0644]
snippets/latex/exam.json [new file with mode: 0644]
snippets/latex/tikz.json [new file with mode: 0644]

diff --git a/snippets/latex.json b/snippets/latex.json
deleted file mode 100644 (file)
index 922fb93..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-    "only": {
-        "prefix": "only",
-        "body": "\\only<${1}>{\n\t${0:${TM_SELECTED_TEXT}}\n}",
-        "description": "\\only wrap"
-    },
-    "exercise": {
-        "prefix": "EX",
-        "body": "\\begin{exercise}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{exercise}",
-        "description": "exercise environment"
-    },
-    "choices": {
-        "prefix": "choices",
-        "body": "\\begin{choices}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{choices}",
-        "description": "exercise environment"
-    },
-    "inputtikz": {
-        "prefix": "ITIKZ",
-        "body": "\\begin{figure}[${1:htbp}]\n\t\\centering\n\t\\inputtikz{${2}}\n\t\\caption{${3:<caption>}}\\label{${4:<label>}}\n\\end{figure}",
-        "description": "figure with \\inputtikz"
-    }
-}
diff --git a/snippets/latex/beamer.json b/snippets/latex/beamer.json
new file mode 100644 (file)
index 0000000..452e716
--- /dev/null
@@ -0,0 +1,25 @@
+{
+    "frame": {
+        "prefix": "frame",
+        "body": [
+            "\\begin{frame}{$1}",
+            "\t$0",
+            "\\end{frame}"
+        ],
+        "description": "beamer frame"
+    },
+    "only": {
+        "prefix": "only",
+        "body": "\\only<${1}>{\n\t${0:${TM_SELECTED_TEXT}}\n}",
+        "description": "\\only wrap"
+    },
+    "block": {
+        "prefix": "block",
+        "body": [
+            "\\begin{block}{$1}",
+            "\t$0",
+            "\\end{block}"
+        ],
+        "description": "beamer block"
+    }
+}
diff --git a/snippets/latex/exam.json b/snippets/latex/exam.json
new file mode 100644 (file)
index 0000000..8a63762
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    "exercise": {
+        "prefix": "EX",
+        "body": "\\begin{exercise}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{exercise}",
+        "description": "exercise environment"
+    },
+    "choices": {
+        "prefix": "choices",
+        "body": "\\begin{choices}\n\t${0:${TM_SELECTED_TEXT}}\n\\end{choices}",
+        "description": "exercise environment"
+    }
+}
diff --git a/snippets/latex/tikz.json b/snippets/latex/tikz.json
new file mode 100644 (file)
index 0000000..13efe63
--- /dev/null
@@ -0,0 +1,7 @@
+{
+    "inputtikz": {
+        "prefix": "ITIKZ",
+        "body": "\\begin{figure}[${1:htbp}]\n\t\\centering\n\t\\inputtikz{${2}}\n\t\\caption{${3:<caption>}}\\label{${4:<label>}}\n\\end{figure}",
+        "description": "figure with \\inputtikz"
+    }
+}