diff options
author | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:03:25 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:03:25 +0200 |
commit | e573b3020c032400eed60b649a2cbf55266e6bb0 (patch) | |
tree | 8f572394ac8433529c7a8e70d160a2fbe8268b4e /vim/bundle/vim-snippets/UltiSnips/tex.snippets | |
parent | b8c667bd64b3edd38d56c63c5bd1db53a23b4499 (diff) | |
download | myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.tar.gz myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.tar.bz2 myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.zip |
Add current configurations from old repository
Diffstat (limited to 'vim/bundle/vim-snippets/UltiSnips/tex.snippets')
-rw-r--r-- | vim/bundle/vim-snippets/UltiSnips/tex.snippets | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/vim/bundle/vim-snippets/UltiSnips/tex.snippets b/vim/bundle/vim-snippets/UltiSnips/tex.snippets new file mode 100644 index 0000000..4c7e44b --- /dev/null +++ b/vim/bundle/vim-snippets/UltiSnips/tex.snippets @@ -0,0 +1,121 @@ +priority -50 + +extends texmath + +snippet "b(egin)?" "begin{} / end{}" br +\begin{${1:something}} + ${0:${VISUAL}} +\end{$1} +endsnippet + +snippet tab "tabular / array environment" b +\begin{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}{${2:c}} +$0${2/((?<=.)c|l|r)|./(?1: & )/g} +\end{$1${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}} +endsnippet + +snippet table "Table environment" b +\begin{table}[${1:htpb}] + \centering + \caption{${2:caption}} + \label{tab:${3:label}} + \begin{${4:t}${4/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}{${5:c}} + $0${5/((?<=.)c|l|r)|./(?1: & )/g} + \end{$4${4/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}} +\end{table} +endsnippet + +snippet fig "Figure environment" b +\begin{figure}[${2:htpb}] + \centering + \includegraphics[width=${3:0.8}\linewidth]{${4:name.ext}} + \caption{${4/(\w+)\.\w+/\u$1/}$0} + \label{fig:${4/(\w+)\.\w+/$1/}} +\end{figure} +endsnippet + +snippet enum "Enumerate" b +\begin{enumerate} + \item $0 +\end{enumerate} +endsnippet + +snippet item "Itemize" b +\begin{itemize} + \item $0 +\end{itemize} +endsnippet + +snippet desc "Description" b +\begin{description} + \item[$1] $0 +\end{description} +endsnippet + +snippet it "Individual item" b +\item ${1} +$0 +endsnippet + +snippet part "Part" b +\part{${1:part name}} +\label{prt:${2:${1/(\w+)|\W+/(?1:\L$0\E:_)/ga}}} + +${0} +endsnippet + +snippet cha "Chapter" b +\chapter{${1:chapter name}} +\label{cha:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}} + +${0} +endsnippet + +snippet sec "Section" b +\section{${1:section name}} +\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}} + +${0} +endsnippet + +snippet sub "Subsection" b +\subsection{${1:subsection name}} +\label{sub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}} + +${0} +endsnippet + +snippet ssub "Subsubsection" b +\subsubsection{${1:subsubsection name}} +\label{ssub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}} + +${0} +endsnippet + +snippet par "Paragraph" b +\paragraph{${1:paragraph name}} +\label{par:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}} + +${0} +endsnippet + +snippet subp "Subparagraph" b +\subparagraph{${1:subparagraph name}} +\label{par:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}} + +${0} +endsnippet + +snippet ni "Non-indented paragraph" b +\noindent +${0} +endsnippet + +snippet pac "Package" b +\usepackage[${1:options}]{${2:package}}$0 +endsnippet + +snippet lp "Long parenthesis" +\left(${1:${VISUAL:contents}}\right)$0 +endsnippet +# vim:ft=snippets: |