From 37a6b4cbe5ff3698747fcf0273218deb90f00d82 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Thu, 18 May 2023 22:03:58 +0200 Subject: [PATCH] Aggiustamenti cambiando da latexsuite a vimtex + UltiSnips + varie. --- vim/UltiSnips/tex/global.snippets | 50 +++++ vim/UltiSnips/tex/templates.snippets | 205 ++++++++++++++++++ vim/after/ftplugin/rust.vim | 4 + .../latex-suite/templates/IEEEtran.tex | 142 ------------ .../latex-suite/templates/article.tex | 13 -- .../latex-suite/templates/breve-talk.tex | 41 ---- .../latex-suite/templates/delega-franco.tex | 52 ----- .../latex-suite/templates/foldedletter.tex | 47 ---- vim/ftplugin/latex-suite/templates/letter.tex | 46 ---- vim/ftplugin/latex-suite/templates/report.tex | 9 - .../templates/report_two_column.tex | 9 - vim/ftplugin/tex.vim | 27 +-- vimrc | 16 +- zsh/aliases/base.aliases.zsh | 3 + 14 files changed, 276 insertions(+), 388 deletions(-) create mode 100644 vim/UltiSnips/tex/global.snippets create mode 100644 vim/UltiSnips/tex/templates.snippets create mode 100644 vim/after/ftplugin/rust.vim delete mode 100755 vim/ftplugin/latex-suite/templates/IEEEtran.tex delete mode 100755 vim/ftplugin/latex-suite/templates/article.tex delete mode 100755 vim/ftplugin/latex-suite/templates/breve-talk.tex delete mode 100755 vim/ftplugin/latex-suite/templates/delega-franco.tex delete mode 100755 vim/ftplugin/latex-suite/templates/foldedletter.tex delete mode 100755 vim/ftplugin/latex-suite/templates/letter.tex delete mode 100755 vim/ftplugin/latex-suite/templates/report.tex delete mode 100755 vim/ftplugin/latex-suite/templates/report_two_column.tex diff --git a/vim/UltiSnips/tex/global.snippets b/vim/UltiSnips/tex/global.snippets new file mode 100644 index 0000000..65f8772 --- /dev/null +++ b/vim/UltiSnips/tex/global.snippets @@ -0,0 +1,50 @@ +# vim:sts=2:sw=2 + +snippet use "Usepackage" b +\usepackage[${2:options}]{${1:${VISUAL}}}$0 +endsnippet + +snippet it "Italics (LaTeX macro)" +\textit{${1:${VISUAL}}}$0 +endsnippet + +snippet +it "Insert an item in an environment" b +\item ${VISUAL}$0 +endsnippet + +snippet bf "Bold (LaTeX macro)" +\textbf{${1:${VISUAL}}}$0 +endsnippet + +snippet sl "Slanted (LaTeX macro)" +\textsl{${1:${VISUAL}}}$0 +endsnippet + +snippet sc "Small Caps (LaTeX macro)" +\textsc{${1:${VISUAL}}}$0 +endsnippet + +snippet em "Emphasize (LaTeX macro)" +\emph{${1:${VISUAL}}}$0 +endsnippet + +snippet al "Alert text" +\alert{${1:${VISUAL}}}<${2:overlay}>$0 +endsnippet + +snippet ebl "Beamer Block Environment" b +\begin{block}{${2:titolo}}<$3> + ${VISUAL}$1 +\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 diff --git a/vim/UltiSnips/tex/templates.snippets b/vim/UltiSnips/tex/templates.snippets new file mode 100644 index 0000000..e464760 --- /dev/null +++ b/vim/UltiSnips/tex/templates.snippets @@ -0,0 +1,205 @@ +# vim:sts=2:sw=2 +snippet tarticle "Article Templates" b +%!TeX ts-program = xelatex +%!TeX encoding = utf-8 Unicode +\documentclass[11pt,a4paper]{article} +\usepackage[italian]{babel} +\usepackage{fontspec,textcomp,xltxtra} +\defaultfontfeatures{Ligatures=Common} +\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} + +\title{$1} +\author{Emiliano Vavassori} +\date{${2:\\today}} + +\begin{document} +\maketitle + +$0 + +\end{document} +endsnippet + +snippet tbrevetalk "Breve talk (Beamer)" b +%!TeX ts-program = xelatex +%!TeX encoding = utf-8 Unicode +\documentclass{beamer} + +\mode{% + \usetheme{Warsaw} + \setbeamercovered{transparent} +} +\beamerdefaultoverlayspecification{<+->} + +\usepackage[italian]{babel} +\usepackage{fontspec,textcom,xltxtra} + +\title[$1]{$2} +\subtitle{$3} + +\author{Emiliano Vavassori} +\institute[BGlug]{Bergamo Linux Users Group} +\date[$4]{\today{} --- $5} +\subject{Talks} + +\begin{document} + +\begin{frame} + \titlepage +\end{frame} + +\begin{frame}{Sommario} + \tableofcontents +\end{frame} + +$0 + +\end{document} +endsnippet + +snippet tdelegafranco "Template per delega di Franco" +%!TeX ts-program = xelatex +%!TeX encoding = utf-8 Unicode +\documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp} +\usepackage[italian]{babel} +\usepackage{fontspec,textcomp,xltxtra,xcolor} +\defaultfontfeatures{Ligatures=Common} +\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} +\usepackage{hyperref} +\definecolor{darkblue}{rgb}{0 0 .53} +\hypersetup{% + colorlinks=true,% + urlcolor=darkblue,% + pdfauthor={Emiliano Vavassori}% +} + +\name{Franco \textsc{Vavassori}} +\address{Franco Vavassori\\\\ + Via B.~Moriggia, n\textdegree~197\\\\ + 24050 Covo (BG)\\\\ + Tel.~+39~338 2592939} +\place{Covo} +\signature{Franco Vavassori} + +\begin{document} +\begin{letter}{% + ${1:Destinatario} +}[%\registered + ${2:Oggetto} +] + +\opening{} + +Con la presente il sottoscritto Franco Vavassori, nato a Romano di Lombardia +il 3 agosto 1956, residente a Covo in via B.~Moriggia n\textdegree~197, Codice +Fiscale \texttt{VVSFNC56M03H509Z}, +\begin{center}\scshape\Large + Delega +\end{center} +$0 + +Colgo l'occasione per porgere + +\closing{Distinti saluti} + +%\begin{enclosures} +% \item Primo Oggetto +%\end{enclosures} + +\end{letter} +\end{document} +endsnippet + +snippet tfoldedletter "Template per lettera piegata." +%!TeX ts-program = xelatex +%!TeX encoding = utf-8 Unicode +\documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp} +\usepackage[italian]{babel} +\usepackage{fontspec,textcomp,xltxtra,xcolor} +\defaultfontfeatures{Ligatures=Common} +\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} +\usepackage{hyperref} +\definecolor{darkblue}{rgb}{0 0 .53} +\hypersetup{% + colorlinks=true,% + urlcolor=darkblue,% + pdfauthor={Emiliano Vavassori}% +} + +\name{Emiliano \textsc{Vavassori}} +\address{Emiliano Vavassori\\\\ + Via B.~Moriggia, n\textdegree~197\\\\ + 24050 Covo (BG)\\\\ + Tel.~+39~347 2362174} +\place{Covo} +\signature{Emiliano Vavassori} + +\begin{document} +\begin{foldedletter}{% + ${1:Destinatario} +}[%\registered + ${2:Oggetto} +] + +\opening{} + +$0 + +Colgo l'occasione per porgere + +\closing{Distinti saluti} + +%\begin{enclosures} +% \item Primo Oggetto +%\end{enclosures} + +\end{foldedletter} +\end{document} +endsnippet + +snippet tletter "Template per lettera." +%!TeX ts-program = xelatex +%!TeX encoding = utf-8 Unicode +\documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp} +\usepackage[italian]{babel} +\usepackage{fontspec,textcomp,xltxtra,xcolor} +\defaultfontfeatures{Ligatures=Common} +\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} +\usepackage{hyperref} +\definecolor{darkblue}{rgb}{0 0 .53} +\hypersetup{% + colorlinks=true,% + urlcolor=darkblue,% + pdfauthor={Emiliano Vavassori}% +} + +\name{Emiliano \textsc{Vavassori}} +\address{Emiliano Vavassori\\\\ + Via B.~Moriggia, n\textdegree~197\\\\ + 24050 Covo (BG)\\\\ + Tel.~+39~347 2362174} +\place{Covo} +\signature{Emiliano Vavassori} + +\begin{document} +\begin{letter}{% + ${1:Destinatario} +}[%\registered + ${2:Oggetto} +] + +\opening{} + +$0 + +Colgo l'occasione per porgere + +\closing{Distinti saluti} + +%\begin{enclosures} +% \item Primo Oggetto +%\end{enclosures} + +\end{letter} +\end{document} +endsnippet diff --git a/vim/after/ftplugin/rust.vim b/vim/after/ftplugin/rust.vim new file mode 100644 index 0000000..8a73139 --- /dev/null +++ b/vim/after/ftplugin/rust.vim @@ -0,0 +1,4 @@ +" Reducing normal spacing for rust +set tabstop=2 +set softtabstop=2 +set shiftwidth=2 diff --git a/vim/ftplugin/latex-suite/templates/IEEEtran.tex b/vim/ftplugin/latex-suite/templates/IEEEtran.tex deleted file mode 100755 index 104f9b2..0000000 --- a/vim/ftplugin/latex-suite/templates/IEEEtran.tex +++ /dev/null @@ -1,142 +0,0 @@ -<+ +> !comp! !exe! -%% Based on in the ieee package available from CTAN, -%% I have changed the options so that most useful ones are clubbed together, -%% Have a look at to understand the function of each package. - -%% This code is offered as-is - no warranty - user assumes all risk. -%% Free to use, distribute and modify. - -% *** Authors should verify (and, if needed, correct) their LaTeX system *** -% *** with the testflow diagnostic prior to trusting their LaTeX platform *** -% *** with production work. IEEE's font choices can trigger bugs that do *** -% *** not appear when using other class files. *** -% Testflow can be obtained at: -% http://www.ctan.org/tex-archive/macros/latex/contrib/supported/IEEEtran/testflow - -% File: !comp!expand("%:p:t")!comp! -% Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% -\documentclass[journal]{IEEEtran} - -\usepackage{cite, graphicx, subfigure, amsmath} -\interdisplaylinepenalty=2500 - -% *** Do not adjust lengths that control margins, column widths, etc. *** -% *** Do not use packages that alter fonts (such as pslatex). *** -% There should be no need to do such things with IEEEtran.cls V1.6 and later. - -<++> -% correct bad hyphenation here -\hyphenation{<+op-tical net-works semi-conduc-tor+>} - - -\begin{document} -% -% paper title -\title{<+Skeleton of IEEEtran.cls for Journals in VIM-Latex+>} -% -% -% author names and IEEE memberships -% note positions of commas and nonbreaking spaces ( ~ ) LaTeX will not break -% a structure at a ~ so this keeps an author's name from being broken across -% two lines. -% use \thanks{} to gain access to the first footnote area -% a separate \thanks must be used for each paragraph as LaTeX2e's \thanks -% was not built to handle multiple paragraphs -\author{<+Sumit Bhardwaj+>~\IEEEmembership{<+Student~Member,~IEEE,+>} -<+John~Doe+>,~\IEEEmembership{<+Fellow,~OSA,+>} -<+and~Jane~Doe,+>~\IEEEmembership{<+Life~Fellow,~IEEE+>}}% <-this % stops a space -\thanks{<+Manuscript received January 20, 2002; revised August 13, 2002. -This work was supported by the IEEE.+>}% <-this % stops a space -\thanks{<+S. Bhardwaj is with the Indian Institute of Technology, Delhi.+>} -% -% The paper headers -\markboth{<+Journal of VIM-\LaTeX\ Class Files,~Vol.~1, No.~8,~August~2002+>}{ -<+Bhardwaj \MakeLowercase{\textit{et al.}+>}: <+Skeleton of IEEEtran.cls for Journals in VIM-Latex+>} -% The only time the second header will appear is for the odd numbered pages -% after the title page when using the twoside option. - - -% If you want to put a publisher's ID mark on the page -% (can leave text blank if you just want to see how the -% text height on the first page will be reduced by IEEE) -%\pubid{0000--0000/00\$00.00~\copyright~2002 IEEE} - -% use only for invited papers -%\specialpapernotice{(Invited Paper)} - -% make the title area -\maketitle - - -\begin{abstract} -<+The abstract goes here.+> -\end{abstract} - -\begin{keywords} -<+IEEEtran, journal, \LaTeX, paper, template, VIM, VIM-\LaTeX+>. -\end{keywords} - -\section{Introduction} -\PARstart{<+T+>}{<+his+>} <+demo file is intended to serve as a ``starter file" -for IEEE journal papers produced under \LaTeX\ using IEEEtran.cls version -1.6 and later.+> -% You must have at least 2 lines in the paragraph with the drop letter -% (should never be an issue) -<+May all your publication endeavors be successful.+> - -% needed in second column of first page if using \pubid -%\pubidadjcol - -% trigger a \newpage just before the given reference -% number - used to balance the columns on the last page -% adjust value as needed - may need to be readjusted if -% the document is modified later -%\IEEEtriggeratref{8} -% The "triggered" command can be changed if desired: -%\IEEEtriggercmd{\enlargethispage{-5in}} - -% references section - -%\bibliographystyle{IEEEtran.bst} -%\bibliography{IEEEabrv,../bib/paper} -\begin{thebibliography}{1} - -\bibitem{IEEEhowto:kopka} -H.~Kopka and P.~W. Daly, \emph{A Guide to {\LaTeX}}, 3rd~ed.\hskip 1em plus -0.5em minus 0.4em\relax Harlow, England: Addison-Wesley, 1999. - -\end{thebibliography} - -% biography section -% -\begin{biography}{Sumit Bhardwaj} -Biography text here. -\end{biography} - -% if you will not have a photo -\begin{biographynophoto}{John Doe} -Biography text here. -\end{biographynophoto} - -% insert where needed to balance the two columns on the last page -%\newpage - -\begin{biographynophoto}{Jane Doe} -Biography text here. -\end{biographynophoto} - -% You can push biographies down or up by placing -% a \vfill before or after them. The appropriate -% use of \vfill depends on what kind of text is -% on the last page and whether or not the columns -% are being equalized. - -%\vfill - -% Can be used to pull up biographies so that the bottom of the last one -% is flush with the other column. -%\enlargethispage{-5in} - -\end{document} diff --git a/vim/ftplugin/latex-suite/templates/article.tex b/vim/ftplugin/latex-suite/templates/article.tex deleted file mode 100755 index c60b6ba..0000000 --- a/vim/ftplugin/latex-suite/templates/article.tex +++ /dev/null @@ -1,13 +0,0 @@ -<+ +> !comp! !exe! -% File: !comp!expand("%:p:t")!comp! -% Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% -\documentclass[a4paper]{article} -\usepackage[italian]{babel} -\usepackage{fontspec,textcomp,xltxtra} -\defaultfontfeatures{Ligatures=Common} -\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} -\begin{document} -<++> -\end{document} diff --git a/vim/ftplugin/latex-suite/templates/breve-talk.tex b/vim/ftplugin/latex-suite/templates/breve-talk.tex deleted file mode 100755 index 282077b..0000000 --- a/vim/ftplugin/latex-suite/templates/breve-talk.tex +++ /dev/null @@ -1,41 +0,0 @@ -<+ +> !comp! !exe! -% File: !comp!expand("%:p:t")!comp! -% Creato: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% Ultima Modifica: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% - -\documentclass{beamer} - -\mode{ - \usetheme{Warsaw} - \setbeamercovered{transparent} -} - -\usepackage[italian]{babel} -\usepackage[utf8x]{inputenc} -\usepackage{times} -\usepackage[T1]{fontenc} -\beamerdefaultoverlayspecification{<+->} - -\title[<+Titolo Corto+>]{<+Titolo lunghissimo+>} -\subtitle{<+Sottotitolo+>} - -\author{Emiliano Vavassori} -\institute[BGlug]{Bergamo Linux Users Group} -\date[<+Evento breve+>]{\today --- <+Occasione lunga+>} -\subject{Talks} - - -\begin{document} - -\begin{frame} - \titlepage -\end{frame} - -\begin{frame}{Sommario} - \tableofcontents -\end{frame} - -<++> - -\end{document} diff --git a/vim/ftplugin/latex-suite/templates/delega-franco.tex b/vim/ftplugin/latex-suite/templates/delega-franco.tex deleted file mode 100755 index 15e6394..0000000 --- a/vim/ftplugin/latex-suite/templates/delega-franco.tex +++ /dev/null @@ -1,52 +0,0 @@ -<+ +> !comp! !exe! -% File: !comp!expand("%:p:t")!comp! -% Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% -\documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp} -\usepackage[italian]{babel} -\usepackage{fontspec,textcomp,xltxtra} -\defaultfontfeatures{Ligatures=Common} -\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} -\usepackage{hyperref} -\hypersetup{% -colorlinks=true,% -urlcolor=blue,% -pdfauthor={Emiliano Vavassori}% -} - -\name{Franco \textsc{Vavassori}} -\address{Franco Vavassori\\ -Via B.~Moriggia, n\textdegree~197\\ -24050 Covo (BG)\\ -Tel.~0363 902222} -\place{Covo} -\signature{Franco Vavassori} - -\begin{document} -\begin{letter}{% - <+destinatario+> -}[% \registered % Invio raccomandata - % <+oggetto della lettera+> -] - -\opening{} - -Con la presente il sottoscritto Franco Vavassori, nato a Romano di Lombardia -il 3 agosto 1956, residente a Covo in via B.~Moriggia n\textdegree~197, Codice -Fiscale \texttt{VVSFNC56M03H509Z}, -\begin{center}\scshape\Large - Delega -\end{center} -<+corpo del testo+> - -Colgo l'occasione per porgere - -\closing{Distinti saluti} - -% \begin{enclosures} -% \item Primo oggetto -% \end{enclosures} - -\end{letter} -\end{document} diff --git a/vim/ftplugin/latex-suite/templates/foldedletter.tex b/vim/ftplugin/latex-suite/templates/foldedletter.tex deleted file mode 100755 index e0b831f..0000000 --- a/vim/ftplugin/latex-suite/templates/foldedletter.tex +++ /dev/null @@ -1,47 +0,0 @@ -<+ +> !comp! !exe! -% File: !comp!expand("%:p:t")!comp! -% Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% -\documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp} -\usepackage[italian]{babel} -\usepackage{fontspec,textcomp,xltxtra,xcolor} -\defaultfontfeatures{Ligatures=Common} -\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} -\usepackage{hyperref} -\definecolor{darkblue}{rgb}{0 0 .53} -\hypersetup{% -colorlinks=true,% -urlcolor=darkblue,% -pdfauthor={Emiliano Vavassori}% -} - -\name{Emiliano \textsc{Vavassori}} -\address{Emiliano Vavassori\\ -Via B.~Moriggia, n\textdegree~197\\ -24050 Covo (BG)\\ -Tel.~0363 902222} -\place{Covo} -\signature{Emiliano Vavassori} - -\begin{document} -\begin{foldedletter}{% -<+indirizzo destinatario+> -}[% \registered % Invio raccomandata -% <+oggetto opzionale+> -] - -\opening{} - -<+corpo del testo+> - -Colgo l'occasione per porgere - -\closing{Distinti saluti} - -% \begin{enclosures} -% \item Primo oggetto -% \end{enclosures} - -\end{foldedletter} -\end{document} diff --git a/vim/ftplugin/latex-suite/templates/letter.tex b/vim/ftplugin/latex-suite/templates/letter.tex deleted file mode 100755 index a18d222..0000000 --- a/vim/ftplugin/latex-suite/templates/letter.tex +++ /dev/null @@ -1,46 +0,0 @@ -<+ +> !comp! !exe! -% File: !comp!expand("%:p:t")!comp! -% Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% -\documentclass[a4paper,12pt,boldsubject,italicsignature]{letteracdp} -\usepackage[italian]{babel} -\usepackage{fontspec,textcomp,xltxtra} -\defaultfontfeatures{Ligatures=Common} -\setmainfont[Mapping=tex-text,Alternate=0,Numbers=OldStyle]{Warnock Pro Light} -\usepackage{hyperref} -\hypersetup{% - colorlinks=true,% - urlcolor=blue,% - pdfauthor={Emiliano Vavassori}% -} - -\name{Emiliano \textsc{Vavassori}} -\address{Emiliano Vavassori\\ - Via B.~Moriggia, n\textdegree~197\\ - 24050 Covo (BG)\\ - Tel.~0363 902222} -\place{Covo} -\signature{Emiliano Vavassori} - -\begin{document} -\begin{letter}{% - <+destinatario+> -}[% \registered % Invio raccomandata - % <+oggetto della lettera+> -] - -\opening{} - -<+corpo del testo+> - -Colgo l'occasione per porgere - -\closing{Distinti saluti} - -% \begin{enclosures} -% \item Primo oggetto -% \end{enclosures} - -\end{letter} -\end{document} diff --git a/vim/ftplugin/latex-suite/templates/report.tex b/vim/ftplugin/latex-suite/templates/report.tex deleted file mode 100755 index 479c7b3..0000000 --- a/vim/ftplugin/latex-suite/templates/report.tex +++ /dev/null @@ -1,9 +0,0 @@ -<+ +> !comp! !exe! -% File: !comp!expand("%")!comp! -% Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% -\documentclass[a4paper]{report} -\begin{document} -<++> -\end{document} diff --git a/vim/ftplugin/latex-suite/templates/report_two_column.tex b/vim/ftplugin/latex-suite/templates/report_two_column.tex deleted file mode 100755 index 15bd95e..0000000 --- a/vim/ftplugin/latex-suite/templates/report_two_column.tex +++ /dev/null @@ -1,9 +0,0 @@ -<+ +> !comp! !exe! -% File: !comp!expand("%:p:t")!comp! -% Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! -% -\documentclass[a4paper,twocolumn]{report} -\begin{document} -<++> -\end{document} diff --git a/vim/ftplugin/tex.vim b/vim/ftplugin/tex.vim index 34f3167..1d82673 100644 --- a/vim/ftplugin/tex.vim +++ b/vim/ftplugin/tex.vim @@ -1,29 +1,4 @@ -" this is mostly a matter of taste. but LaTeX looks good with just a bit -" of indentation. set softtabstop=2 set shiftwidth=2 +set tabstop=2 set textwidth=78 - -" TIP: if you write your \label's as \label{fig:something}, then if you -" type in \ref{fig: and press you will automatically cycle through -" all the figure labels. Very useful! -set iskeyword+=: - -" Permits é in documents -imap +it Tex_InsertItemOnThisLine - -" Permits ì in documents -imap Tex_LeftRight - -" PDF Format -let g:Tex_CustomTemplateDirectory = '~/.vim/ftplugin/latex-suite/templates' -let g:Tex_DefaultTargetFormat = 'pdf' -let g:Tex_CompileRule_pdf = 'xelatex -interaction=nonstopmode $*' -let g:Tex_ViewRule_pdf = 'evince' - -" Mappings for Beamer -call IMAP('BFR', "\\begin{frame}\\\\frametitle{<+title+>}\<++>\\\end{frame}<++>", 'tex') -call IMAP('BAL', "\\alert{~++~}~+overlay+~", 'tex', '~+', '+~') -call IMAP('BBL', "\\begin{block}{~+title+~}~+overlay+~\~++~\\\end{block}~++~", 'tex', '~+', '+~') -" Trying a vmap -vmap ,a "zdi\alert{z} diff --git a/vimrc b/vimrc index 71e92db..6e47116 100644 --- a/vimrc +++ b/vimrc @@ -28,13 +28,17 @@ Plug 'xsbeats/vim-blade' " HTML 5 template Plug 'othree/html5.vim' -" Vim-latexsuite -Plug 'vim-latex/vim-latex' +" latex stuff +Plug 'SirVer/ultisnips' +Plug 'honza/vim-snippets' +Plug 'lervag/vimtex' +Plug 'ckunte/latex-snippets-vim', { 'tag': '*' } Plug 'hashivim/vim-terraform' " Rust Plug 'rust-lang/rust.vim' +Plug 'zooxyt/Ultisnips-rust' " Devicons Plug 'ryanoasis/vim-devicons' @@ -77,7 +81,7 @@ let g:NERDTreeNodeDelimiter = "\u00a0" map :NERDTreeToggle " LaTeXsuite - Cambio il tex flavor -let g:tex_flavor='latex' +" let g:tex_flavor='latex' " Airline-theme - Set up airline-theme let g:airline_powerline_fonts = 1 @@ -129,3 +133,9 @@ endfunction let g:coc_filetype_map = { \ 'yaml.ansible': 'ansible', \ } + +" vimtex configuration +let g:vimtex_view_method = 'zathura' + +" Ultisnips configuration +let g:UltiSnipsExpandTrigger = '' diff --git a/zsh/aliases/base.aliases.zsh b/zsh/aliases/base.aliases.zsh index 01f5a19..caac867 100644 --- a/zsh/aliases/base.aliases.zsh +++ b/zsh/aliases/base.aliases.zsh @@ -13,3 +13,6 @@ alias ap="ansible-playbook" alias digs="dig +short" # L'impostazione predefinita dell'alias di ping non mi piace unalias ping + +alias nmcu="nmcli connection up" +alias nmcd="nmcli connection down"