2023-05-18 22:03:58 +02:00
|
|
|
# vim:sts=2:sw=2
|
|
|
|
|
2023-06-16 00:11:51 +02:00
|
|
|
snippet env "Create environment from input" b
|
|
|
|
\begin{${1:${VISUAL:center}}}
|
|
|
|
$0
|
|
|
|
\end{$1}
|
|
|
|
endsnippet
|
|
|
|
|
2023-05-18 22:03:58 +02:00
|
|
|
snippet use "Usepackage" b
|
2023-06-16 00:11:51 +02:00
|
|
|
\usepackage[${2:italian}]{${1:${VISUAL:babel}}}$0
|
2023-05-18 22:03:58 +02:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet it "Italics (LaTeX macro)"
|
|
|
|
\textit{${1:${VISUAL}}}$0
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet +it "Insert an item in an environment" b
|
2023-06-16 00:11:51 +02:00
|
|
|
\item ${1:${VISUAL}}
|
|
|
|
$0
|
2023-05-18 22:03:58 +02:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet bf "Bold (LaTeX macro)"
|
2023-06-16 00:11:51 +02:00
|
|
|
\textbf{${1:${VISUAL}}} $0
|
2023-05-18 22:03:58 +02:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet sl "Slanted (LaTeX macro)"
|
2023-06-16 00:11:51 +02:00
|
|
|
\textsl{${1:${VISUAL}}} $0
|
2023-05-18 22:03:58 +02:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet sc "Small Caps (LaTeX macro)"
|
2023-06-16 00:11:51 +02:00
|
|
|
\textsc{${1:${VISUAL}}} $0
|
2023-05-18 22:03:58 +02:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet em "Emphasize (LaTeX macro)"
|
2023-06-16 00:11:51 +02:00
|
|
|
\emph{${1:${VISUAL}}} $0
|
2023-05-18 22:03:58 +02:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet al "Alert text"
|
2023-06-16 00:11:51 +02:00
|
|
|
\alert{${1:${VISUAL}}}<${2:overlay}> $0
|
2023-05-18 22:03:58 +02:00
|
|
|
endsnippet
|
|
|
|
|
|
|
|
snippet ebl "Beamer Block Environment" b
|
|
|
|
\begin{block}{${2:titolo}}<$3>
|
2023-06-16 00:11:51 +02:00
|
|
|
${1:${VISUAL}}
|
2023-05-18 22:03:58 +02:00
|
|
|
\end{block}
|
|
|
|
$0
|
|
|
|
endsnippet
|
|
|
|
|
|
|
|
global !p
|
|
|
|
def math():
|
|
|
|
return vim.eval('vimtex#syntax#in_mathzone()') == '1'
|
|
|
|
endglobal
|
|
|
|
|
|
|
|
context "math()"
|
|
|
|
snippet ff "\frac macro."
|
|
|
|
\frac{$1}{$2}$0
|
|
|
|
endsnippet
|