added vim snippets
authorDaniel Liu <mr.picklepinosaur@gmail.com>
Fri, 27 Nov 2020 20:03:38 +0000 (15:03 -0500)
committerDaniel Liu <mr.picklepinosaur@gmail.com>
Fri, 27 Nov 2020 20:03:38 +0000 (15:03 -0500)
.vim/mysnippets/all.snippets [new file with mode: 0644]
.vim/mysnippets/html.snippets [new file with mode: 0644]
.vim/mysnippets/scheme.snippets [new file with mode: 0644]
.vim/mysnippets/tex.snippets [new file with mode: 0644]

diff --git a/.vim/mysnippets/all.snippets b/.vim/mysnippets/all.snippets
new file mode 100644 (file)
index 0000000..3929897
--- /dev/null
@@ -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 (file)
index 0000000..0a508e5
--- /dev/null
@@ -0,0 +1,17 @@
+snippet `<[a-z]+[0-9]*` "HTML tag expand" r
+<`!p snip.rv = match.group()[1:]`>$0</`!p snip.rv = match.group()[1:]`>
+endsnippet
+
+snippet html "html template" w
+<!DOCTYPE html>
+<html>
+       <head>
+               <meta charset="utf-8">
+               <title></title>
+       </head>
+
+       <body>
+
+       </body>
+</html>
+endsnippet
diff --git a/.vim/mysnippets/scheme.snippets b/.vim/mysnippets/scheme.snippets
new file mode 100644 (file)
index 0000000..fa2a1ef
--- /dev/null
@@ -0,0 +1,3 @@
+snippet ~ "lambda" iA
+endsnippet
diff --git a/.vim/mysnippets/tex.snippets b/.vim/mysnippets/tex.snippets
new file mode 100644 (file)
index 0000000..84bf0d4
--- /dev/null
@@ -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