summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYigit Sever2022-06-04 15:33:33 +0300
committerYigit Sever2022-06-04 15:33:33 +0300
commit766260cbebe7cf92316b5ac85de5e4f1fe2c1701 (patch)
treeddf547703900cf30c0090bcdf1692af318afc0c3
parent5faa81206403d748a6ef6d92c7ee53446bae445f (diff)
downloaddotfiles-766260cbebe7cf92316b5ac85de5e4f1fe2c1701.tar.gz
dotfiles-766260cbebe7cf92316b5ac85de5e4f1fe2c1701.tar.bz2
dotfiles-766260cbebe7cf92316b5ac85de5e4f1fe2c1701.zip
nvim: reclaim lost tex snippets
-rw-r--r--.config/nvim/my_snippets/tex.snippets62
1 files changed, 56 insertions, 6 deletions
diff --git a/.config/nvim/my_snippets/tex.snippets b/.config/nvim/my_snippets/tex.snippets
index f81ad94..727253f 100644
--- a/.config/nvim/my_snippets/tex.snippets
+++ b/.config/nvim/my_snippets/tex.snippets
@@ -21,12 +21,6 @@ snippet template "Basic template" b
21\pdfminorversion=7 21\pdfminorversion=7
22\usepackage{pdfpages} 22\usepackage{pdfpages}
23\usepackage{transparent} 23\usepackage{transparent}
24\newcommand{\incfig}[1]{%
25 \def\svgwidth{\columnwidth}
26 \import{./figures/}{#1.pdf_tex}
27}
28
29\pdfsuppresswarningpagegroup=1
30 24
31\begin{document} 25\begin{document}
32 $0 26 $0
@@ -120,3 +114,59 @@ context "math()"
120snippet '((\d+)|(\d*)(\\)?([A-Za-z]+)((\^|_)(\{\d+\}|\d))*)/' "Fraction" wrA 114snippet '((\d+)|(\d*)(\\)?([A-Za-z]+)((\^|_)(\{\d+\}|\d))*)/' "Fraction" wrA
121\\frac{`!p snip.rv = match.group(1)`}{$1}$0 115\\frac{`!p snip.rv = match.group(1)`}{$1}$0
122endsnippet 116endsnippet
117
118snippet sec "Section"
119\section{${1:${VISUAL:section name}}}%
120\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
121
122$0
123endsnippet
124
125snippet sec* "Section"
126\section*{${1:${VISUAL:section name}}}%
127\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
128
129${0}
130endsnippet
131
132
133snippet sub "Subsection"
134\subsection{${1:${VISUAL:subsection name}}}%
135\label{sub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
136
137$0
138endsnippet
139
140snippet sub* "Subsection"
141\subsection*{${1:${VISUAL:subsection name}}}%
142\label{sub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
143
144${0}
145endsnippet
146
147snippet ssub "Subsubsection"
148\subsubsection{${1:${VISUAL:subsubsection name}}}%
149\label{ssub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
150
151$0
152endsnippet
153
154snippet ssub* "Subsubsection"
155\subsubsection*{${1:${VISUAL:subsubsection name}}}%
156\label{ssub:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
157
158${0}
159endsnippet
160
161snippet "mint(ed)?( (\S+))?" "Minted code typeset" br
162\begin{listing}
163\begin{minted}[linenos,numbersep=5pt,frame=lines,framesep=2mm]{${1:`!p
164snip.rv = match.group(3) if match.group(2) is not None else "language"`}}
165${2:${VISUAL:code}}
166\end{minted}
167\caption{${3:caption name}}
168\label{lst:${4:${3/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3\E)/ga}}}
169\end{listing}
170
171$0
172endsnippet