simple notes
This commit is contained in:
@@ -173,7 +173,7 @@ return require('packer').startup({ function(use)
|
||||
'lervag/vimtex',
|
||||
config = function()
|
||||
vim.g.vimtex_view_general_viewer = 'zathura'
|
||||
vim.g.vimtex_compiler_method = "xelatex"
|
||||
vim.g.vimtex_compiler_method = "latexmk"
|
||||
-- vim.g.vimtex_view_general_options = = '-x nvim -n -c "Vimtex'
|
||||
-- 'file:@pdf\\#src:@line@tex'
|
||||
-- vim.g.vimtex_quickfix_enabled = 0
|
||||
|
||||
+61
-18
@@ -28,6 +28,7 @@ snippet template "Basic template" b
|
||||
$3
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
$0
|
||||
\end{document}
|
||||
endsnippet
|
||||
@@ -59,8 +60,8 @@ endsnippet
|
||||
snippet table "Table" b
|
||||
\begin{table}[${1:htpb}]
|
||||
\centering
|
||||
\caption{${2:caption}}
|
||||
\label{tab:${3:label}}
|
||||
\caption{$2}
|
||||
\label{tab:$3}
|
||||
\begin{tabular}{${5:c}}
|
||||
$6${5/((?<=.)c|l|r)|./(?1: & )/g}
|
||||
\end{tabular}
|
||||
@@ -76,6 +77,30 @@ snippet ~~ "Sim" iA
|
||||
\sim
|
||||
endsnippet
|
||||
|
||||
snippet section "Section" bA
|
||||
\sect{$1}$0
|
||||
endsnippet
|
||||
|
||||
snippet chapter "Chapter" bA
|
||||
\chapter{$1}$0
|
||||
endsnippet
|
||||
|
||||
snippet part "Part" bA
|
||||
\part{$1}$0
|
||||
endsnippet
|
||||
|
||||
snippet theorem "Theorem" bA
|
||||
\begin{theorem}[$1]
|
||||
$2
|
||||
\end{theorem} $0
|
||||
endsnippet
|
||||
|
||||
snippet definition "Definition" bA
|
||||
\begin{definition}[$1]
|
||||
$2
|
||||
\end{definition} $0
|
||||
endsnippet
|
||||
|
||||
# Math
|
||||
|
||||
snippet sm "Math" wA
|
||||
@@ -156,11 +181,6 @@ snippet nabl "Nabla" iA
|
||||
\nabla
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet del "Nabla" iA
|
||||
\nabla
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet \\\ "Set minus" iA
|
||||
\setminus
|
||||
@@ -210,7 +230,7 @@ endsnippet
|
||||
|
||||
priority 10
|
||||
context "math()"
|
||||
snippet in "In" iA
|
||||
snippet inn "In" iA
|
||||
\in
|
||||
endsnippet
|
||||
|
||||
@@ -326,13 +346,13 @@ endsnippet
|
||||
|
||||
priority 10
|
||||
context "math()"
|
||||
snippet "hat" "Hat" riA
|
||||
snippet "hat" "Hat" ri
|
||||
\hat{$1}$0
|
||||
endsnippet
|
||||
|
||||
priority 100
|
||||
context "math()"
|
||||
snippet "([a-zA-Z])hat" "Hat" riA
|
||||
snippet "([a-zA-Z])hat" "Hat" ri
|
||||
\hat{`!p snip.rv = match.group(1)`}
|
||||
endsnippet
|
||||
|
||||
@@ -354,7 +374,13 @@ snippet '(?<!\\)(sin|cos|arccot|cot|csc|ln|log|exp|star|perp|arcsin|arccos|arcta
|
||||
\\`!p snip.rv = match.group(1)`
|
||||
endsnippet
|
||||
|
||||
priority 200
|
||||
priority 1000
|
||||
context "math()"
|
||||
snippet epsi "Epsilon" wA
|
||||
\epsilon
|
||||
endsnippet
|
||||
|
||||
priority 500
|
||||
context "math()"
|
||||
snippet '(?<!\\)(alpha|beta|gamma|Delta|delta|epsilon|zeta|eta|Theta|theta|iota|kappa|Lambda|lambda|mu|nu|Xi|xi|Pi|pi|varpi|Sigma|sigma|tau|Phi|phi|varphi|chi|Psi|psi|Omega|omega)' "Greek" rwA
|
||||
\\`!p snip.rv = match.group(1)`
|
||||
@@ -586,7 +612,7 @@ endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet sum "Bounded Sum" w
|
||||
\sum_{${1:n=${2:1}}}^{${3:\infty}} $3
|
||||
\sum_{${1:n=${2:1}}}^{${3:\infty}} $4
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
@@ -704,7 +730,7 @@ endsnippet
|
||||
|
||||
# Code
|
||||
|
||||
snippet sc "Code" wA
|
||||
snippet bsc "Blank Inline Code" wA
|
||||
\texttt{${1}}`!p
|
||||
if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']:
|
||||
snip.rv = ' '
|
||||
@@ -713,13 +739,30 @@ else:
|
||||
`$2
|
||||
endsnippet
|
||||
|
||||
snippet dc "Display Code" wA
|
||||
\begin{minted}[$1]
|
||||
$2
|
||||
\end{minted} $0
|
||||
snippet sc "Inline Code" wA
|
||||
\inlinecode{${1}}{${2}}`!p
|
||||
if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']:
|
||||
snip.rv = ' '
|
||||
else:
|
||||
snip.rv = ''
|
||||
`$2
|
||||
endsnippet
|
||||
|
||||
snippet dc "Block Code" wA
|
||||
\begin{listing}[${1:H}]
|
||||
\caption{$2}
|
||||
\label{lst:$3}
|
||||
\begin{code}{$4}
|
||||
$5
|
||||
\end{code} $0
|
||||
\end{listing}
|
||||
endsnippet
|
||||
|
||||
snippet impc "Import Code" wA
|
||||
\inputminted{$1}{$2}$0
|
||||
\begin{listing}[${1:H}]
|
||||
\caption{$2}
|
||||
\label{lst:$3}
|
||||
\importcode{$1}{$2}$0
|
||||
\end{listing}
|
||||
endsnippet
|
||||
|
||||
|
||||
Reference in New Issue
Block a user