From 48fb9a71d09c27236129f8ba743ad29173765262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Neumann?= Date: Tue, 30 Oct 2012 18:49:10 +0100 Subject: UltiSnips --- .vim/UltiSnips/tex.snippets | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .vim/UltiSnips/tex.snippets (limited to '.vim') 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 -- cgit v1.2.3