mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-02-07 06:18:59 +00:00
Update the UltiSnips snippets
This commit is contained in:
parent
6f37d2c957
commit
711de7d425
@ -30,6 +30,10 @@ snippet hl "Highlighted text" biw
|
||||
#$1# $0
|
||||
endsnippet
|
||||
|
||||
snippet a "Hyperlink" iw
|
||||
${1:<url>}[${2:<text>}] $0
|
||||
endsnippet
|
||||
|
||||
snippet sp "Superscript" biw
|
||||
^$1^ $0
|
||||
endsnippet
|
||||
@ -87,7 +91,7 @@ endsnippet
|
||||
# Multimedia blocks
|
||||
snippet figure "Image block with caption" bi
|
||||
.${2:<caption>}
|
||||
image::${1:<image path>}[${3:width=100%,height=100%}]
|
||||
image::${1:<image path>}[$2, ${3:width=100%,height=100%}]
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
|
@ -127,19 +127,19 @@ endsnippet
|
||||
# Document structure tags
|
||||
snippet chapter "Chapter element" bi
|
||||
\chapter{$1}
|
||||
\label{ch:$1}
|
||||
\label{ch!$1}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet section "Section tag" bi
|
||||
\section{$1}
|
||||
\label{sec:$1}
|
||||
\label{sec!$1}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet subsec "Subsection tag" bi
|
||||
\subsection{$1}
|
||||
\label{subsec:$1}
|
||||
\label{subsec!$1}
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
@ -219,7 +219,7 @@ endsnippet
|
||||
|
||||
snippet mb "Math block" bi
|
||||
\begin{equation*}
|
||||
`!p snip.rv=smart_space(t[1], "\label{eq:", loose=True)`$1`!p snip.rv=smart_space(t[1], "}", loose=True)`
|
||||
`!p snip.rv=smart_space(t[1], " \label{eq!", loose=True)`$1`!p snip.rv=smart_space(t[1], "}", loose=True)`
|
||||
$2
|
||||
\end{equation*}
|
||||
$0
|
||||
@ -227,7 +227,7 @@ endsnippet
|
||||
|
||||
snippet eq "Equation environment for mathematical typesetting" biw
|
||||
\begin{equation}
|
||||
\label{eq:$1}
|
||||
\label{eq!$1}
|
||||
$2
|
||||
\end{equation}
|
||||
$0
|
||||
@ -235,7 +235,7 @@ endsnippet
|
||||
|
||||
snippet subeq "Subequation environment" biw
|
||||
\begin{subequations}
|
||||
\label{eq:$1}
|
||||
\label{eq!$1}
|
||||
$2
|
||||
\end{subequations}
|
||||
$0
|
||||
@ -249,12 +249,12 @@ $0
|
||||
endsnippet
|
||||
|
||||
snippet alignli "Quick align equation with label" biw
|
||||
${1:<LHS>} &= ${2:<RHS>} \label{eq:$3} \\ $4
|
||||
${1:<LHS>} &= ${2:<RHS>} \label{eq!$3} \\ $4
|
||||
endsnippet
|
||||
|
||||
snippet gathered "Gathered environment which lets you gather a bunch of equations and assign them under one equation number" bi
|
||||
\begin{gathered}
|
||||
\label{eq:$1}
|
||||
\label{eq!$1}
|
||||
$2
|
||||
\end{gathered}
|
||||
$0
|
||||
@ -262,7 +262,7 @@ endsnippet
|
||||
|
||||
snippet proof "Proof" biw
|
||||
\begin{proof}
|
||||
\label{proof:$1}
|
||||
\label{proof!$1}
|
||||
$2
|
||||
\end{proof}
|
||||
$0
|
||||
@ -271,7 +271,7 @@ endsnippet
|
||||
snippet figure "Figure environment" biw
|
||||
\begin{figure}
|
||||
\centering
|
||||
\label{fig:$1}
|
||||
\label{fig!$1}
|
||||
$2
|
||||
\caption{${3:$1}}
|
||||
\end{figure}
|
||||
@ -296,7 +296,7 @@ snippet graph "Quickly make a graph" bi
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
\caption{$10}
|
||||
\label{fig:${11:$10}}
|
||||
\label{fig!${11:$10}}
|
||||
\end{figure}
|
||||
$0
|
||||
endsnippet
|
||||
@ -320,7 +320,7 @@ snippet agraph "Quickly plot a graph without considering integers" bi
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
\caption{$10}
|
||||
\label{fig:${11:$10}}
|
||||
\label{fig!${11:$10}}
|
||||
\end{figure}
|
||||
$0
|
||||
endsnippet
|
||||
@ -342,7 +342,7 @@ snippet graph3 "3D graph from pgfplots package" bi
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
\caption{$10}
|
||||
\label{fig:${11:$10}}
|
||||
\label{fig!${11:$10}}
|
||||
\end{figure}
|
||||
$0
|
||||
endsnippet
|
||||
@ -965,7 +965,7 @@ snippet lcode "Code listings with label" iw
|
||||
$2
|
||||
\end{minted}
|
||||
`!p snip.rv=smart_space(t[3], "\caption{", loose=True)`$3`!p snip.rv=smart_space(t[3], "}", loose=True)`
|
||||
\label{lst:${4:$3}}
|
||||
\label{code!${4:$3}}
|
||||
\end{listing}
|
||||
endsnippet
|
||||
|
||||
@ -1134,7 +1134,7 @@ endsnippet
|
||||
|
||||
snippet ddef "Doc definition block" iw
|
||||
\begin{-doc-definition}
|
||||
`!p snip.rv=smart_space(t[1], "\label{def:", loose=True)`$1`!p snip.rv=smart_space(t[1], "}", loose=True)`
|
||||
`!p snip.rv=smart_space(t[1], " \label{def!", loose=True)`$1`!p snip.rv=smart_space(t[1], "}", loose=True)`
|
||||
$2
|
||||
\end{-doc-definition}
|
||||
$0
|
||||
@ -1142,7 +1142,7 @@ endsnippet
|
||||
|
||||
snippet dprop "Doc property block" iw
|
||||
\begin{-doc-property}
|
||||
`!p snip.rv=smart_space(t[1], "\label{prop:", loose=True)`$1`!p snip.rv=smart_space(t[1], "}", loose=True)`
|
||||
`!p snip.rv=smart_space(t[1], " \label{prop!", loose=True)`$1`!p snip.rv=smart_space(t[1], "}", loose=True)`
|
||||
$2
|
||||
\end{-doc-property}
|
||||
$0
|
||||
|
Loading…
Reference in New Issue
Block a user