add snippet descriptions
This commit is contained in:
parent
85004a6c60
commit
da157ef079
@ -1,215 +1,215 @@
|
|||||||
#PREAMBLE
|
#PREAMBLE
|
||||||
#newcommand
|
#newcommand
|
||||||
snippet nc
|
snippet nc \newcommand
|
||||||
\newcommand{\${1:cmd}}[${2:opt}]{${3:realcmd}} ${0}
|
\newcommand{\${1:cmd}}[${2:opt}]{${3:realcmd}} ${0}
|
||||||
#usepackage
|
#usepackage
|
||||||
snippet up
|
snippet up \usepackage
|
||||||
\usepackage[${1:options}]{${2:package}} ${0}
|
\usepackage[${1:options}]{${2:package}} ${0}
|
||||||
#newunicodechar
|
#newunicodechar
|
||||||
snippet nuc
|
snippet nuc \newunicodechar
|
||||||
\newunicodechar{${1}}{${2:\ensuremath}${3:tex-substitute}}} ${0}
|
\newunicodechar{${1}}{${2:\ensuremath}${3:tex-substitute}}} ${0}
|
||||||
#DeclareMathOperator
|
#DeclareMathOperator
|
||||||
snippet dmo
|
snippet dmo \DeclareMathOperator
|
||||||
\DeclareMathOperator{${1}}{${2}} ${0}
|
\DeclareMathOperator{${1}}{${2}} ${0}
|
||||||
|
|
||||||
#DOCUMENT
|
#DOCUMENT
|
||||||
# \begin{}...\end{}
|
# \begin{}...\end{}
|
||||||
snippet begin
|
snippet begin \begin{} ... \end{} block
|
||||||
\begin{${1:env}}
|
\begin{${1:env}}
|
||||||
${0}
|
${0}
|
||||||
\end{$1}
|
\end{$1}
|
||||||
# Tabular
|
# Tabular
|
||||||
snippet tab
|
snippet tab tabular (or arbitrary) environment
|
||||||
\begin{${1:tabular}}{${2:c}}
|
\begin{${1:tabular}}{${2:c}}
|
||||||
${0}
|
${0}
|
||||||
\end{$1}
|
\end{$1}
|
||||||
snippet thm
|
snippet thm thm (or arbitrary) environment with optional argument
|
||||||
\begin[${1:author}]{${2:thm}}
|
\begin[${1:author}]{${2:thm}}
|
||||||
${0}
|
${0}
|
||||||
\end{$2}
|
\end{$2}
|
||||||
snippet center
|
snippet center center environment
|
||||||
\begin{center}
|
\begin{center}
|
||||||
${0}
|
${0}
|
||||||
\end{center}
|
\end{center}
|
||||||
# Align(ed)
|
# Align(ed)
|
||||||
snippet ali
|
snippet ali align(ed) environment
|
||||||
\begin{align${1:ed}}
|
\begin{align${1:ed}}
|
||||||
\label{eq:${2}}
|
\label{eq:${2}}
|
||||||
${0}
|
${0}
|
||||||
\end{align$1}
|
\end{align$1}
|
||||||
# Gather(ed)
|
# Gather(ed)
|
||||||
snippet gat
|
snippet gat gather(ed) environment
|
||||||
\begin{gather${1:ed}}
|
\begin{gather${1:ed}}
|
||||||
${0}
|
${0}
|
||||||
\end{gather$1}
|
\end{gather$1}
|
||||||
# Equation
|
# Equation
|
||||||
snippet eq
|
snippet eq equation environment
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
\label{eq:${2}}
|
\label{eq:${2}}
|
||||||
${0}
|
${0}
|
||||||
\end{equation}
|
\end{equation}
|
||||||
# Equation
|
# Equation
|
||||||
snippet eq*
|
snippet eq* unnumbered equation environment
|
||||||
\begin{equation*}
|
\begin{equation*}
|
||||||
${0}
|
${0}
|
||||||
\end{equation*}
|
\end{equation*}
|
||||||
# Unnumbered Equation
|
# Unnumbered Equation
|
||||||
snippet \
|
snippet \ unnumbered equation: \[ ... \]
|
||||||
\[
|
\[
|
||||||
${0}
|
${0}
|
||||||
\]
|
\]
|
||||||
# Equation array
|
# Equation array
|
||||||
snippet eqnarray
|
snippet eqnarray eqnarray environment
|
||||||
\begin{eqnarray}
|
\begin{eqnarray}
|
||||||
${0}
|
${0}
|
||||||
\end{eqnarray}
|
\end{eqnarray}
|
||||||
# Label
|
# Label
|
||||||
snippet lab
|
snippet lab \label
|
||||||
\label{${1:eq:}${2:fig:}${3:tab:}${0}}
|
\label{${1:eq:}${2:fig:}${3:tab:}${0}}
|
||||||
# Enumerate
|
# Enumerate
|
||||||
snippet enum
|
snippet enum enumerate environment
|
||||||
\begin{enumerate}
|
\begin{enumerate}
|
||||||
\item ${0}
|
\item ${0}
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
# Itemize
|
# Itemize
|
||||||
snippet itemize
|
snippet itemize itemize environment
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item ${0}
|
\item ${0}
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
snippet item
|
snippet item \item
|
||||||
\item ${1}
|
\item ${1}
|
||||||
# Description
|
# Description
|
||||||
snippet desc
|
snippet desc description environment
|
||||||
\begin{description}
|
\begin{description}
|
||||||
\item[${1}] ${0}
|
\item[${1}] ${0}
|
||||||
\end{description}
|
\end{description}
|
||||||
# Endless new item
|
# Endless new item
|
||||||
snippet ]i
|
snippet ]i \item (recursive)
|
||||||
\item ${1}
|
\item ${1}
|
||||||
${0:]i}
|
${0:]i}
|
||||||
# Matrix
|
# Matrix
|
||||||
snippet mat
|
snippet mat smart matrix environment
|
||||||
\begin{${1:p/b/v/V/B/small}matrix}
|
\begin{${1:p/b/v/V/B/small}matrix}
|
||||||
${0}
|
${0}
|
||||||
\end{$1matrix}
|
\end{$1matrix}
|
||||||
# Cases
|
# Cases
|
||||||
snippet cas
|
snippet cas cases environment
|
||||||
\begin{cases}
|
\begin{cases}
|
||||||
${1:equation}, &\text{ if }${2:case}\\
|
${1:equation}, &\text{ if }${2:case}\\
|
||||||
${0}
|
${0}
|
||||||
\end{cases}
|
\end{cases}
|
||||||
# Split
|
# Split
|
||||||
snippet spl
|
snippet spl split environment
|
||||||
\begin{split}
|
\begin{split}
|
||||||
${0}
|
${0}
|
||||||
\end{split}
|
\end{split}
|
||||||
# Part
|
# Part
|
||||||
snippet part
|
snippet part document \part
|
||||||
\part{${1:part name}} % (fold)
|
\part{${1:part name}} % (fold)
|
||||||
\label{prt:${2:$1}}
|
\label{prt:${2:$1}}
|
||||||
${0}
|
${0}
|
||||||
% part $2 (end)
|
% part $2 (end)
|
||||||
# Chapter
|
# Chapter
|
||||||
snippet cha
|
snippet cha \chapter
|
||||||
\chapter{${1:chapter name}}
|
\chapter{${1:chapter name}}
|
||||||
\label{cha:${2:$1}}
|
\label{cha:${2:$1}}
|
||||||
${0}
|
${0}
|
||||||
# Section
|
# Section
|
||||||
snippet sec
|
snippet sec \section
|
||||||
\section{${1:section name}}
|
\section{${1:section name}}
|
||||||
\label{sec:${2:$1}}
|
\label{sec:${2:$1}}
|
||||||
${0}
|
${0}
|
||||||
# Section without number
|
# Section without number
|
||||||
snippet sec*
|
snippet sec* \section*
|
||||||
\section*{${1:section name}}
|
\section*{${1:section name}}
|
||||||
\label{sec:${2:$1}}
|
\label{sec:${2:$1}}
|
||||||
${0}
|
${0}
|
||||||
# Sub Section
|
# Sub Section
|
||||||
snippet sub
|
snippet sub \subsection
|
||||||
\subsection{${1:subsection name}}
|
\subsection{${1:subsection name}}
|
||||||
\label{sub:${2:$1}}
|
\label{sub:${2:$1}}
|
||||||
${0}
|
${0}
|
||||||
# Sub Section without number
|
# Sub Section without number
|
||||||
snippet sub*
|
snippet sub* \subsection*
|
||||||
\subsection*{${1:subsection name}}
|
\subsection*{${1:subsection name}}
|
||||||
\label{sub:${2:$1}}
|
\label{sub:${2:$1}}
|
||||||
${0}
|
${0}
|
||||||
# Sub Sub Section
|
# Sub Sub Section
|
||||||
snippet subs
|
snippet subs \subsubsection
|
||||||
\subsubsection{${1:subsubsection name}}
|
\subsubsection{${1:subsubsection name}}
|
||||||
\label{ssub:${2:$1}}
|
\label{ssub:${2:$1}}
|
||||||
${0}
|
${0}
|
||||||
# Sub Sub Section without number
|
# Sub Sub Section without number
|
||||||
snippet subs*
|
snippet subs* \subsubsection*
|
||||||
\subsubsection*{${1:subsubsection name}}
|
\subsubsection*{${1:subsubsection name}}
|
||||||
\label{ssub:${2:$1}}
|
\label{ssub:${2:$1}}
|
||||||
${0}
|
${0}
|
||||||
# Paragraph
|
# Paragraph
|
||||||
snippet par
|
snippet par \paragraph
|
||||||
\paragraph{${1:paragraph name}}
|
\paragraph{${1:paragraph name}}
|
||||||
\label{par:${2:$1}}
|
\label{par:${2:$1}}
|
||||||
${0}
|
${0}
|
||||||
# Sub Paragraph
|
# Sub Paragraph
|
||||||
snippet subp
|
snippet subp \subparagraph
|
||||||
\subparagraph{${1:subparagraph name}}
|
\subparagraph{${1:subparagraph name}}
|
||||||
\label{subp:${2:$1}}
|
\label{subp:${2:$1}}
|
||||||
${0}
|
${0}
|
||||||
snippet ni
|
snippet ni \noindent
|
||||||
\noindent
|
\noindent
|
||||||
${0}
|
${0}
|
||||||
#References
|
#References
|
||||||
snippet itd
|
snippet itd description \item
|
||||||
\item[${1:description}] ${0:item}
|
\item[${1:description}] ${0:item}
|
||||||
snippet figure
|
snippet figure reference to a figure
|
||||||
${1:Figure}~\ref{${2:fig:}}
|
${1:Figure}~\ref{${2:fig:}}
|
||||||
snippet table
|
snippet table reference to a table
|
||||||
${1:Table}~\ref{${2:tab:}}
|
${1:Table}~\ref{${2:tab:}}
|
||||||
snippet listing
|
snippet listing reference to a listing
|
||||||
${1:Listing}~\ref{${2:list}}
|
${1:Listing}~\ref{${2:list}}
|
||||||
snippet section
|
snippet section reference to a section
|
||||||
${1:Section}~\ref{sec:${2}} ${0}
|
${1:Section}~\ref{sec:${2}} ${0}
|
||||||
snippet page
|
snippet page reference to a page
|
||||||
${1:page}~\pageref{${2}} ${0}
|
${1:page}~\pageref{${2}} ${0}
|
||||||
snippet index
|
snippet index \index
|
||||||
\index{${1:index}} ${0}
|
\index{${1:index}} ${0}
|
||||||
#Citations
|
#Citations
|
||||||
snippet citen
|
snippet citen \citen
|
||||||
\citen{${1}} ${0}
|
\citen{${1}} ${0}
|
||||||
# natbib citations
|
# natbib citations
|
||||||
snippet citep
|
snippet citep \citep
|
||||||
\citep{${1}} ${0}
|
\citep{${1}} ${0}
|
||||||
snippet citet
|
snippet citet \citet
|
||||||
\citet{${1}} ${0}
|
\citet{${1}} ${0}
|
||||||
snippet cite
|
snippet cite \cite[]{}
|
||||||
\cite[${1}]{${2}} ${0}
|
\cite[${1}]{${2}} ${0}
|
||||||
snippet citea
|
snippet citea \citeauthor
|
||||||
\citeauthor{${1}} ${0}
|
\citeauthor{${1}} ${0}
|
||||||
snippet citey
|
snippet citey \citeyear
|
||||||
\citeyear{${1}} ${0}
|
\citeyear{${1}} ${0}
|
||||||
snippet fcite
|
snippet fcite \footcite[]{}
|
||||||
\footcite[${1}]{${2}}${0}
|
\footcite[${1}]{${2}}${0}
|
||||||
#Formating text: italic, bold, underline, small capital, emphase ..
|
#Formating text: italic, bold, underline, small capital, emphase ..
|
||||||
snippet it
|
snippet it italic text
|
||||||
\textit{${0:text}}
|
\textit{${0:text}}
|
||||||
snippet bf
|
snippet bf bold face text
|
||||||
\textbf{${0:text}}
|
\textbf{${0:text}}
|
||||||
snippet under
|
snippet under underline text
|
||||||
\underline{${0:text}}
|
\underline{${0:text}}
|
||||||
snippet emp
|
snippet emp emphasize text
|
||||||
\emph{${0:text}}
|
\emph{${0:text}}
|
||||||
snippet sc
|
snippet sc small caps text
|
||||||
\textsc{${0:text}}
|
\textsc{${0:text}}
|
||||||
#Choosing font
|
#Choosing font
|
||||||
snippet sf
|
snippet sf sans serife text
|
||||||
\textsf{${0:text}}
|
\textsf{${0:text}}
|
||||||
snippet rm
|
snippet rm roman font text
|
||||||
\textrm{${0:text}}
|
\textrm{${0:text}}
|
||||||
snippet tt
|
snippet tt typewriter (monospace) text
|
||||||
\texttt{${0:text}}
|
\texttt{${0:text}}
|
||||||
#misc
|
#misc
|
||||||
snippet ft
|
snippet ft \footnote
|
||||||
\footnote{${0:text}}
|
\footnote{${0:text}}
|
||||||
snippet fig
|
snippet fig figure environment (includegraphics)
|
||||||
\begin{figure}
|
\begin{figure}
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\includegraphics[scale=${1}]{Figures/${2}}
|
\includegraphics[scale=${1}]{Figures/${2}}
|
||||||
@ -218,7 +218,7 @@ snippet fig
|
|||||||
\label{fig:${4}}
|
\label{fig:${4}}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
${0}
|
${0}
|
||||||
snippet tikz
|
snippet tikz figure environment (tikzpicture)
|
||||||
\begin{figure}
|
\begin{figure}
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\begin{tikzpicture}[scale=${1:1}]
|
\begin{tikzpicture}[scale=${1:1}]
|
||||||
@ -230,31 +230,31 @@ snippet tikz
|
|||||||
\end{figure}
|
\end{figure}
|
||||||
${0}
|
${0}
|
||||||
#math
|
#math
|
||||||
snippet stackrel
|
snippet stackrel \stackrel{}{}
|
||||||
\stackrel{${1:above}}{${2:below}} ${0}
|
\stackrel{${1:above}}{${2:below}} ${0}
|
||||||
snippet frac
|
snippet frac \frac{}{}
|
||||||
\frac{${1:num}}{${2:denom}} ${0}
|
\frac{${1:num}}{${2:denom}} ${0}
|
||||||
snippet sum
|
snippet sum \sum^{}_{}
|
||||||
\sum^{${1:n}}_{${2:i=1}} ${0}
|
\sum^{${1:n}}_{${2:i=1}} ${0}
|
||||||
snippet lim
|
snippet lim \lim_{}
|
||||||
\lim_{${1:x \to +\infty}} ${0}
|
\lim_{${1:x \to +\infty}} ${0}
|
||||||
snippet frame
|
snippet frame frame environment
|
||||||
\begin{frame}[${1:t}]{${2:title}}
|
\begin{frame}[${1:t}]{${2:title}}
|
||||||
${0}
|
${0}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
snippet block
|
snippet block block environment
|
||||||
\begin{block}{${1:title}}
|
\begin{block}{${1:title}}
|
||||||
${0}
|
${0}
|
||||||
\end{block}
|
\end{block}
|
||||||
snippet alert
|
snippet alert alertblock environment
|
||||||
\begin{alertblock}{${1:title}}
|
\begin{alertblock}{${1:title}}
|
||||||
${0}
|
${0}
|
||||||
\end{alertblock}
|
\end{alertblock}
|
||||||
snippet example
|
snippet example exampleblock environment
|
||||||
\begin{exampleblock}{${1:title}}
|
\begin{exampleblock}{${1:title}}
|
||||||
${0}
|
${0}
|
||||||
\end{exampleblock}
|
\end{exampleblock}
|
||||||
snippet col2
|
snippet col2 two-column environment
|
||||||
\begin{columns}
|
\begin{columns}
|
||||||
\begin{column}{0.5\textwidth}
|
\begin{column}{0.5\textwidth}
|
||||||
${1}
|
${1}
|
||||||
|
@ -1,47 +1,47 @@
|
|||||||
snippet header
|
snippet header standard Vim script file header
|
||||||
" File: ${1:`expand('%:t')`}
|
" File: ${1:`expand('%:t')`}
|
||||||
" Author: ${2:`g:snips_author`}
|
" Author: ${2:`g:snips_author`}
|
||||||
" Description: ${3}
|
" Description: ${3}
|
||||||
${0:" Last Modified: `strftime("%B %d, %Y")`}
|
${0:" Last Modified: `strftime("%B %d, %Y")`}
|
||||||
snippet guard
|
snippet guard script reload guard
|
||||||
if exists('${1:did_`vim_snippets#Filename()`}') || &cp${2: || version < 700}
|
if exists('${1:did_`vim_snippets#Filename()`}') || &cp${2: || version < 700}
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let $1 = 1${0}
|
let $1 = 1${0}
|
||||||
snippet f
|
snippet f function
|
||||||
fun! ${1:`expand('%') =~ 'autoload' ? substitute(matchstr(expand('%:p'),'autoload/\zs.*\ze.vim'),'[/\\]','#','g').'#' : ''`}${2:function_name}(${3})
|
fun! ${1:`expand('%') =~ 'autoload' ? substitute(matchstr(expand('%:p'),'autoload/\zs.*\ze.vim'),'[/\\]','#','g').'#' : ''`}${2:function_name}(${3})
|
||||||
${0}
|
${0}
|
||||||
endf
|
endf
|
||||||
snippet t
|
snippet t try ... catch statement
|
||||||
try
|
try
|
||||||
${1}
|
${1}
|
||||||
catch ${2}
|
catch ${2}
|
||||||
${0}
|
${0}
|
||||||
endtry
|
endtry
|
||||||
snippet for
|
snippet for for ... in loop
|
||||||
for ${1} in ${2}
|
for ${1} in ${2}
|
||||||
${0}
|
${0}
|
||||||
endfor
|
endfor
|
||||||
snippet forkv
|
snippet forkv for [key, value] in loop
|
||||||
for [${1},${2}] in items(${3})
|
for [${1},${2}] in items(${3})
|
||||||
${0}
|
${0}
|
||||||
unlet $1 $2
|
unlet $1 $2
|
||||||
endfor
|
endfor
|
||||||
snippet wh
|
snippet wh while loop
|
||||||
while ${1}
|
while ${1}
|
||||||
${0}
|
${0}
|
||||||
endw
|
endw
|
||||||
snippet if
|
snippet if if statement
|
||||||
if ${1}
|
if ${1}
|
||||||
${0}
|
${0}
|
||||||
endif
|
endif
|
||||||
snippet ife
|
snippet ife if ... else statement
|
||||||
if ${1}
|
if ${1}
|
||||||
${2}
|
${2}
|
||||||
else
|
else
|
||||||
${0}
|
${0}
|
||||||
endif
|
endif
|
||||||
snippet au
|
snippet au augroup ... autocmd block
|
||||||
augroup ${1:AU_NAME}
|
augroup ${1:AU_NAME}
|
||||||
" this one is which you're most likely to use?
|
" this one is which you're most likely to use?
|
||||||
autocmd ${2:BufRead,BufNewFile} ${3:*.ext,*.ext3|<buffer[=N]>} ${0}
|
autocmd ${2:BufRead,BufNewFile} ${3:*.ext,*.ext3|<buffer[=N]>} ${0}
|
||||||
|
Loading…
Reference in New Issue
Block a user