diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ee84da --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.sw* diff --git a/sh.snippets b/sh.snippets index 9256604..fa89b73 100644 --- a/sh.snippets +++ b/sh.snippets @@ -1,3 +1,14 @@ snippet alias "Custom alias" -alias ${1:name}="${2:command}" -endsnippet +alias ${1:name}="${2:cmd}" +endsnippet + +snippet 1lf "One-line function" +${1:name}() { ${2:cmd} ; } +endsnippet + +snippet mlf "Multi-line function" +${1:name}() { + ${2:cmd} +} +endsnippet + diff --git a/snippets.snippets b/snippets.snippets new file mode 100644 index 0000000..afc73ef --- /dev/null +++ b/snippets.snippets @@ -0,0 +1,10 @@ +snippet ts "Tabstop" +${${1:number}:${2:default}} +endsnippet + +snippet "b(egin)?" "begin{} / end{}" br +\begin{${1:something}} + ${0:${VISUAL}} +\end{$1} +endsnippet + diff --git a/texmath.snippets b/texmath.snippets index c5a7018..0f8d977 100644 --- a/texmath.snippets +++ b/texmath.snippets @@ -1,7 +1,15 @@ -snippet eqs "Equation with split" b -\begin{equation*} - \begin{split} - $0 - \end{split} -\end{equation*} +snippet al "Align (math)" b +\begin{align*} + $0 +\end{align*} +endsnippet + +snippet pwf "Piecewise function" b +\[ + ${1:name} = \left. + \begin{cases} + ${2:equation}, & ${3:condition} \\\\ + \end{cases} + \right\\} +\] endsnippet