summaryrefslogtreecommitdiff
path: root/.vim
diff options
context:
space:
mode:
Diffstat (limited to '.vim')
-rw-r--r--.vim/UltiSnips/tex.snippets54
1 files changed, 54 insertions, 0 deletions
diff --git a/.vim/UltiSnips/tex.snippets b/.vim/UltiSnips/tex.snippets
new file mode 100644
index 0000000..0296f30
--- /dev/null
+++ b/.vim/UltiSnips/tex.snippets
@@ -0,0 +1,54 @@
+# workaround vim-latex bug
+snippet "\b[rR]ene?\b" "Expand my name" r
+Ren\'{e} Neumann
+endsnippet
+
+# beamer: Frame
+snippet frame "Frame" b
+\begin{frame}{$1}
+ $0
+\end{frame}
+endsnippet
+
+# This is a copy from the distribution, removing pointless comments at the end
+snippet part "Part" b!
+\part{${1:part name}}
+\label{prt:${2:${1/(\w+)|\W+/(?1:\L$0\E:_)/g}}}
+
+${0}
+endsnippet
+
+snippet cha "Chapter" b!
+\chapter{${1:chapter name}}
+\label{cha:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}}
+
+${0}
+endsnippet
+
+snippet sec "Section" b!
+\section{${1:section name}}
+\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}}
+
+${0}
+endsnippet
+
+
+snippet sub "Subsection" b!
+\subsection{${1:subsection name}}
+\label{sub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}}
+
+${0}
+endsnippet
+
+snippet ssub "Subsubsection" b!
+\subsubsection{${1:subsubsection name}}
+\label{ssub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/g}}}
+
+${0}
+endsnippet
+
+snippet par "Paragraph" b!
+\paragraph{${1:paragraph name}} $0
+endsnippet
+
+clearsnippets subp