From b5ed08343f15e77cb52e8dc7a4abcc30b82e3eaa Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Tue, 2 Aug 2011 11:01:19 +0200 Subject: [PATCH] Split tex snippets into math and other because some filetypes only use math mode (i.e. rst) --- UltiSnips/tex.snippets | 47 ++------------------------------------ UltiSnips/texmath.snippets | 46 +++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 45 deletions(-) create mode 100644 UltiSnips/texmath.snippets diff --git a/UltiSnips/tex.snippets b/UltiSnips/tex.snippets index c4f475e..74554af 100644 --- a/UltiSnips/tex.snippets +++ b/UltiSnips/tex.snippets @@ -1,3 +1,5 @@ +extends texmath + ########################################################################### # LATEX SNIPPETS # ########################################################################### @@ -50,51 +52,6 @@ snippet desc "Description" b \end{description} endsnippet -############## -# MATH STUFF # -############## -snippet eq "Equation" b -\begin{equation} - $0 -\end{equation} -endsnippet - -snippet eqnn "Equation without number" b -\begin{equation*} - $0 -\end{equation*} -endsnippet - -snippet eqa "Equation array" b -\begin{eqnarray} - $1 & $2 & $0 -\end{eqnarray} -endsnippet - -snippet eqann "Equation array without numbers" b -\begin{eqnarray*} - $1 & $2 & $0 -\end{eqnarray*} - -endsnippet -snippet frac "Fraction" -\frac{${1:nom}}{${2:denom}} -endsnippet - -snippet mat "Smart Matrix" -\begin{${1:p/b/v/V/B/small}matrix} - $0 -\end{$1matrix} -endsnippet - -snippet lr( "left( right)" i -\left( $0 \right) -endsnippet - -snippet lr| "left| right|" i -\left| $0 \right| -endsnippet - ##################################### # SECTIONS, CHAPTERS AND THERE LIKE # ##################################### diff --git a/UltiSnips/texmath.snippets b/UltiSnips/texmath.snippets new file mode 100644 index 0000000..a5b22ad --- /dev/null +++ b/UltiSnips/texmath.snippets @@ -0,0 +1,46 @@ +############## +# MATH STUFF # +############## +snippet eq "Equation" b +\begin{equation} + $0 +\end{equation} +endsnippet + +snippet eqnn "Equation without number" b +\begin{equation*} + $0 +\end{equation*} +endsnippet + +snippet eqa "Equation array" b +\begin{eqnarray} + $1 & $2 & $0 +\end{eqnarray} +endsnippet + +snippet eqann "Equation array without numbers" b +\begin{eqnarray*} + $1 & $2 & $0 +\end{eqnarray*} + +endsnippet +snippet frac "Fraction" +\frac{${1:nom}}{${2:denom}} +endsnippet + +snippet mat "Smart Matrix" +\begin{${1:p/b/v/V/B/small}matrix} + $0 +\end{$1matrix} +endsnippet + +snippet lr( "left( right)" i +\left( $0 \right) +endsnippet + +snippet lr| "left| right|" i +\left| $0 \right| +endsnippet + +# vim:ft=snippets: