From 21bcb06555cf0d717e79a0810d2a8be7936c74e2 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Fri, 16 Jun 2023 00:20:25 +0200 Subject: [PATCH] Ulteriori aggiunte a snippets per LaTeX. --- vim/UltiSnips/tex/global.snippets | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/vim/UltiSnips/tex/global.snippets b/vim/UltiSnips/tex/global.snippets index 45f5133..7da09dc 100644 --- a/vim/UltiSnips/tex/global.snippets +++ b/vim/UltiSnips/tex/global.snippets @@ -1,15 +1,30 @@ # vim:sts=2:sw=2 +snippet use "Usepackage" b +\usepackage{${1:${VISUAL:babel}}}$0 +endsnippet -snippet env "Create environment from input" b +snippet useo "Usepackage with option" b +\usepackage[${2:italian}]{${1:${VISUAL:babel}}}$0 +endsnippet + +snippet italian "Use italian hyphenations with polyglossia" b +\usepackage{polyglossia} +\setdefaultlanguage{italian} +$0 +endsnippet + +snippet othlang "Insert an environment with another language" b +\begin{lang}{${1:english}} + $0 +\end{lang} +endsnippet + +snippet env "Environment from input" b \begin{${1:${VISUAL:center}}} $0 \end{$1} endsnippet -snippet use "Usepackage" b -\usepackage[${2:italian}]{${1:${VISUAL:babel}}}$0 -endsnippet - snippet it "Italics (LaTeX macro)" \textit{${1:${VISUAL}}}$0 endsnippet