From: Daniel Liu Date: Fri, 27 Nov 2020 20:03:38 +0000 (-0500) Subject: added vim snippets X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=fdcd4945ebca688bd20c91247331518b29248f7e;p=dotfiles.git added vim snippets --- diff --git a/.vim/mysnippets/all.snippets b/.vim/mysnippets/all.snippets new file mode 100644 index 0000000..3929897 --- /dev/null +++ b/.vim/mysnippets/all.snippets @@ -0,0 +1,3 @@ +snippet today "Today" w +`date +"%A, %B %d"` +endsnippet diff --git a/.vim/mysnippets/html.snippets b/.vim/mysnippets/html.snippets new file mode 100644 index 0000000..0a508e5 --- /dev/null +++ b/.vim/mysnippets/html.snippets @@ -0,0 +1,17 @@ +snippet `<[a-z]+[0-9]*` "HTML tag expand" r +<`!p snip.rv = match.group()[1:]`>$0 +endsnippet + +snippet html "html template" w + + + + + + + + + + + +endsnippet diff --git a/.vim/mysnippets/scheme.snippets b/.vim/mysnippets/scheme.snippets new file mode 100644 index 0000000..fa2a1ef --- /dev/null +++ b/.vim/mysnippets/scheme.snippets @@ -0,0 +1,3 @@ +snippet ~ "lambda" iA +λ +endsnippet diff --git a/.vim/mysnippets/tex.snippets b/.vim/mysnippets/tex.snippets new file mode 100644 index 0000000..84bf0d4 --- /dev/null +++ b/.vim/mysnippets/tex.snippets @@ -0,0 +1,125 @@ +# Enviros +snippet \begin "enviroment" bA +\begin{$1} + $0 +\end{$1} +endsnippet + + +snippet enum "enumerate" w +\begin{enumerate}[$1] + $0 +\end{enumerate} +endsnippet + + +snippet align "align" w +\begin{align*} + $0 +\end{align*} +endsnippet + + +snippet center "center" w +\begin{center} + $0 +\end{center} +endsnippet + +# FRACTIONS +snippet // "frac" iA +\\frac{$1}{$2}$0 +endsnippet + + +# LIMITS +snippet lim "limit" w +\lim\limits_{$1 \to $2}$3 +endsnippet + + +snippet inflim "limit to infinity" w +\lim\limits_{n \to \infty} +endsnippet + + +# SUMMATION +snippet sum "Summation" w +\sum\limits_{$1}^{$2}$3 +endsnippet + +snippet prod "Product" w +\prod\limits_{$1}^{$2}$3 +endsnippet + +# MATH MODES +priority 10 +snippet im "inline math" w +$$1$$0 +endsnippet + + +snippet bm "block math" w +\[ + $1 +\]$0 +endsnippet + + +# SETS +snippet set "Set" w +\\{ $0 \\} +endsnippet + + +snippet reals "Set of Reals" w +\mathbb{R} +endsnippet + + +snippet integers "Set of Integers" w +\mathbb{Z} +endsnippet + + +snippet naturals "Set of Naturals" w +\mathbb{N} +endsnippet + + +# OTHERS +snippet implies "Implies" w +\Rightarrow +endsnippet + + +snippet mod "Mod" w +{\ (\textrm{mod}\ $1)} +endsnippet + + +snippet eea "Extended Euclidian Algorithm" w +\begin{center} +\begin{tabular}{|c|c|c|c|} + \hline + x & y & r & q\\\\ + \hline + 1 & 0 & $1 & 0\\\\ + 0 & 1 & $2 & 0\\\\ + $3 + \hline +\end{tabular} +\end{center} +endsnippet + + +snippet lemma "Lemma" w +\textbf{Lemma $1} + +\fbox{% + \parbox{\textwidth}{ + $0 + }% +} + +endsnippet