summaryrefslogtreecommitdiff
path: root/.vim
diff options
context:
space:
mode:
authorRené Neumann <rene.neumann@in.tum.de>2012-10-30 18:49:10 +0100
committerRené Neumann <rene.neumann@in.tum.de>2012-10-30 18:49:10 +0100
commit48fb9a71d09c27236129f8ba743ad29173765262 (patch)
treeb1aee7bdf412201f9e88abb794b165487e783b20 /.vim
parent70ee9ce5beb9a1a73814596003382c1ecf159d1a (diff)
downloaddotfiles-48fb9a71d09c27236129f8ba743ad29173765262.tar.gz
dotfiles-48fb9a71d09c27236129f8ba743ad29173765262.tar.bz2
dotfiles-48fb9a71d09c27236129f8ba743ad29173765262.zip
UltiSnips
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