From 912705af30348cdf3b27188297b1e72f915cdfd9 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 18 Nov 2012 15:40:33 +0100 Subject: [PATCH] ftplugin/text: Add, basic snippets for LaTeX. --- vim/ftplugin/tex/tex.xpt.vim | 68 ++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 vim/ftplugin/tex/tex.xpt.vim diff --git a/vim/ftplugin/tex/tex.xpt.vim b/vim/ftplugin/tex/tex.xpt.vim new file mode 100644 index 0000000..2b3b5ba --- /dev/null +++ b/vim/ftplugin/tex/tex.xpt.vim @@ -0,0 +1,68 @@ +" vim: ft=xpt + +" XPTemplate template file. +" +" Language: LaTeX +" Maintainer: Simon Ruderich +" License: GPL v3+ + +" Copyright (C) 2012 Simon Ruderich +" +" This file is free software: you can redistribute it and/or modify +" it under the terms of the GNU General Public License as published by +" the Free Software Foundation, either version 3 of the License, or +" (at your option) any later version. +" +" This file is distributed in the hope that it will be useful, +" but WITHOUT ANY WARRANTY; without even the implied warranty of +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +" GNU General Public License for more details. +" +" You should have received a copy of the GNU General Public License +" along with this file. If not, see . + + +" Prevent errors if XPTemplate is not installed. +if !exists('g:XPT#ver') + finish +endif + +XPTemplate priority=personal + + +" SECTIONS + +XPT s synonym=section " \section{..} +\section`*^{`title^} + +XPT ss " \subsection{..} +\subsection`*^{`title^} + +XPT sss " \subsubsection{..} +\subsubsection`*^{`title^} + + +" ENVIRONMENTS + +XPT itemize " \begin{itemize} .. \end{itemize} +\begin{itemize} +\item `cursor^ +\end{itemize} + +XPT enumerate " \begin{enumerate} .. \end{enumerate} +\begin{enumerate} +\item `cursor^ +\end{enumerate} + +XPT description " \begin{description} .. \end{description} +\begin{description} +\item `cursor^ +\end{description} + +XPT i "\item .. +\item`[`text?`]^ `cursor^ + +XPT align " \begin{align} .. \end{align} +\begin{align`*^} +`cursor^ +\end{align`*^} -- 2.45.2