summaryrefslogtreecommitdiff
path: root/vim-extra/.config/nvim/UltiSnips/tex.snippets
diff options
context:
space:
mode:
Diffstat (limited to 'vim-extra/.config/nvim/UltiSnips/tex.snippets')
-rw-r--r--vim-extra/.config/nvim/UltiSnips/tex.snippets44
1 files changed, 44 insertions, 0 deletions
diff --git a/vim-extra/.config/nvim/UltiSnips/tex.snippets b/vim-extra/.config/nvim/UltiSnips/tex.snippets
new file mode 100644
index 0000000..1cdc972
--- /dev/null
+++ b/vim-extra/.config/nvim/UltiSnips/tex.snippets
@@ -0,0 +1,44 @@
+# https://castel.dev/post/lecture-notes-1/
+snippet begin "begin{} / end{}" bA
+\begin{$1}
+ $0
+\end{$1}
+endsnippet
+
+snippet dm "Display math" wA
+\[
+$1
+.\] $0
+endsnippet
+
+# Subscript
+snippet _p "Subscript" iA
+_{$1}$0
+endsnippet
+
+# To the power of
+snippet td "To the power of" iA
+^{$1}$0
+endsnippet
+
+# Fraction
+snippet // "Fraction" iA
+\\frac{$1}{$2}$0
+endsnippet
+
+# Integral
+snippet \int_ "Bestemt intergrale" wA
+\int_{$1}^{$2} $3 \,dx$0
+:qa
+endsnippet
+
+# Section and stuff
+snippet sec "Section" bA
+\section{$1}
+$0
+endsnippet
+
+snippet ssec "Sub section" bA
+\subsection{$1}
+$0
+endsnippet