From a5ce7440b51d37f0aceb01a98a14541b9f26cc90 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 25 May 2020 17:40:50 +0200 Subject: [PATCH] vim: Add custom texmath snippets --- home/.config/nvim/UltiSnips/texmath.snippets | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 home/.config/nvim/UltiSnips/texmath.snippets diff --git a/home/.config/nvim/UltiSnips/texmath.snippets b/home/.config/nvim/UltiSnips/texmath.snippets new file mode 100644 index 0000000..c883476 --- /dev/null +++ b/home/.config/nvim/UltiSnips/texmath.snippets @@ -0,0 +1,15 @@ +extends texmath + +snippet qf "Quadratic formula (user is responsible for parentheses)" w +\frac{-${2:b} \pm \sqrt{$2^2 - 4 \cdot ${1:a} \cdot ${3:c}}}{2 \cdot $1}$0 +endsnippet + +snippet aligned "aligned environment (in math mode)" w +\begin{aligned} + $1 &= $0 \\\\ +\end{aligned} +endsnippet + +snippet si "Insert SI unit (only works with simple numbers)" w +\SI{${1:amount}}{${2:unit}} +endsnippet