From 2b4002c5df0a168363c67d61853d8d9863328afc Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 17 Oct 2015 18:27:21 +0100 Subject: Add new snippets for latex --- .vim/mySnippets/tex.snippets | 148 +++++++++++++++++++++++++++++-------------- 1 file changed, 101 insertions(+), 47 deletions(-) (limited to '.vim/mySnippets/tex.snippets') diff --git a/.vim/mySnippets/tex.snippets b/.vim/mySnippets/tex.snippets index 0e23ec1..dd7ae0b 100644 --- a/.vim/mySnippets/tex.snippets +++ b/.vim/mySnippets/tex.snippets @@ -1,61 +1,98 @@ -snippet real "Field of real numbers" i -\real +# Misc # +snippet herm "Hermite polynomials" w +\hermite{$1}$0 endsnippet -snippet grad "Gradient" i -\grad +snippet hermf "Hermite function" w +\hermitef{$1}$0 endsnippet -snippet div "Divergence" i -\dive +snippet gauss "Gaussian density" w +\gaussian[${1:\mu}][${2:\Sigma}]$0 endsnippet -snippet new "New command" b -\newcommand{$1}[$2]{$3}$0 +snippet inf "Infinity" w +\infty$0 endsnippet -snippet op "Operator style" i -\op +snippet fa "For all" w +\forall $0 endsnippet -snippet pard "Partial derivative" i -\pardl{$1}{$2}$0 +snippet text "Math text" w +\text{ ${1:text} }$0 endsnippet -snippet pardd "Double partial derivative" i -\parddl{$1}{$2}$0 + + +# Differential calculus # +snippet int "Integral" w +\int_{${1:\real^n}}$0 endsnippet -snippet herm "Hermite polynomials" i -\hermite +snippet grad "Gradient" w +\grad{$1}$0 endsnippet -snippet red "Red text" i -\red{$1}$0 +snippet div "Divergence" w +\dive endsnippet -snippet sumi "Sum over index set" i + + +# Sequences and sums # +snippet seq "Sequence" w +\seq{${1:element}}{${2:index}}{${3:initial}}{${4:final}}$0 +endsnippet + +snippet sumi "Sum over index set" w \sum_{${1:i} \in ${2:I}}$0 endsnippet -snippet int "Integral" i -\int_{$1} +snippet sum "Sum" w +\sum_{${1:i=1}}^{${2:n}} endsnippet -snippet ip "Inner product" i -\ip{$1}{$2}$0 + + +# Operators +snippet op "Operator" w +\op{${1:operator}}$0 endsnippet -snippet ipw "Inner product" i -\wip{$1}{$2}{$3}$0 +snippet mean "Expectation" w +\expect $0 +endsnippet + +snippet proj "Projection" w +\proj{${1:element}}{${2:subspace}}$0 +endsnippet + +snippet orth "Orthogonal complement" w +\orth{${1:space}}$0 endsnippet -snippet norm "Norm" i -\norm{$1}$0 +snippet dot "Dot product" w +\dotx +endsnippet + + + +# Spaces # +snippet space "Space" w +\Space{${1:name}}$0 +endsnippet + +snippet poly "Polynomials" w +\poly{${1:d}} +endsnippet + +snippet cont "Continuous function" w +\cont{$1}{$2}$0 endsnippet -snippet normw "Weighted norm" i -\wnorm{$1}{${2:\gamma}} +snippet smooth "Smooth function" w +\smooth{${1:\real^n}} $0 endsnippet snippet test "Test functions" i @@ -70,34 +107,44 @@ snippet sob "Sobolev spaces" w \sobolev{${1:exponent}}{${2:domain}}${3/^.+$/[/}${3:weight}${3/^.+$/]/}$0 endsnippet -snippet cont "Continuous function" w -\cont{$1}{$2}$0 +snippet real "Field of real numbers" w +\real endsnippet -snippet mean "Expectation" w -\expect $0 -endsnippet -snippet dot "Dot product" w -\dotx -endsnippet +# Norms and inner products # snippet abs "Absolute value" w \abs{$1}$0 endsnippet -snippet sum "Sum" w -\sum_{${1:i=1}}^{${2:n}} +snippet norm "Sobolev norm" w +\norm{${1:function}}$0 endsnippet -snippet smooth "Smooth function" w -\smooth{${1:\real^n}} $0 +snippet snorm "Sobolev norm" w +\norm{${1:function}}[${2:index}]$0 endsnippet -snippet ref "Clever reference" w -\cref{$1}$0 +snippet wsnorm "Weighted Sobolev norm" w +\norm{${1:function}}[${2:index}][${3:weight}]$0 +endsnippet + +snippet ip "Inner product" w +\ip{$1}{$2}$0 endsnippet +snippet sip "Sobolev inner product" w +\ip{${1:function}}{${2:function}}[${3:index}]$0 +endsnippet + +snippet wsip "Weighted Sobolev inner product" w +\ip{${1:function}}{${2:function}}[${3:index}][${4:weight}]$0 +endsnippet + + + +# Beamer # snippet frame "My frame snippet" b \begin{frame} \frametitle{$1} @@ -105,10 +152,17 @@ snippet frame "My frame snippet" b \end{frame} endsnippet -snippet gauss "Gaussian density" w -\gaussian[${1:\mu}][${2:\Sigma}]$0 + + +# Latex commands # +snippet red "Red text" w +\red{$1}$0 endsnippet -snippet poly "Polynomials" w -\poly{${1:d}} +snippet ref "Clever reference" w +\cref{$1}$0 +endsnippet + +snippet new "New command" b +\newcommand{$1}[$2]{$3}$0 endsnippet -- cgit v1.2.3