time reset

This commit is contained in:
EvilMuffinHa 2022-11-19 13:46:44 -05:00
parent 6b182fc571
commit c76364784e
5 changed files with 104 additions and 3 deletions

View File

@ -226,15 +226,28 @@ vim.cmd [[
augroup END augroup END
]] ]]
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd({ 'FileType',
}, {
pattern = "*", pattern = "*",
callback = function() callback = function()
if vim.bo.filetype ~= "plaintex" and vim.bo.filetype ~= "tex" and vim.bo.filetype ~= "latex" then if vim.bo.filetype ~= "plaintex" and vim.bo.filetype ~= "tex" and vim.bo.filetype ~= "latex" and
vim.bo.filetype ~= "qf" and vim.bo.filetype ~= "bib" and vim.bo.filetype ~= "" and vim.bo.filetype ~= "pdf"
and vim.bo.filetype ~= "conf" then
vim.cmd [[ :COQnow -s ]] vim.cmd [[ :COQnow -s ]]
end end
end end
}) })
-- vim.api.nvim_create_autocmd({ 'FileType', 'BufRead', 'BufReadPre', 'BufReadPost', 'BufWrite', 'BufWritePre',
-- 'BufWritePost' }, {
-- pattern = "*",
-- callback = function()
-- if vim.bo.filetype ~= "plaintex" and vim.bo.filetype ~= "tex" and vim.bo.filetype ~= "latex" then
-- vim.cmd [[ :COQnow -s ]]
-- end
-- end
-- })
-- vim.cmd [[ -- vim.cmd [[
-- augroup disabletexlsp -- augroup disabletexlsp
-- autocmd! -- autocmd!

View File

@ -1,6 +1,13 @@
global !p global !p
# thanks to gilles castel
def math(): def math():
return vim.eval('vimtex#syntax#in_mathzone()') == '1' return vim.eval('vimtex#syntax#in_mathzone()') == '1'
def env(name):
[x,y] = vim.eval("vimtex#env#is_inside('" + name + "')")
return x != '0' and y != '0'
endglobal endglobal
snippet beg "begin{} / end{}" bA snippet beg "begin{} / end{}" bA
@ -26,4 +33,82 @@ snippet dm "Display Math" wA
.\] $0 .\] $0
endsnippet endsnippet
snippet sc "Code" wA
\texttt{${1}}`!p
if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']:
snip.rv = ' '
else:
snip.rv = ''
`$2
endsnippet
snippet dc "Display Code" wA
\begin{lstlisting}[$1]
$2
\end{lstlisting} $0
endsnippet
snippet pac "Package" b
\usepackage[$1]{$2}$0
endsnippet
snippet template "Basic template" b
\documentclass[$1]{$2}
$3
\begin{document}
$0
\end{document}
endsnippet
snippet item "Itemize" bA
\begin{itemize}
\item $0
\end{itemize}
endsnippet
snippet enum "Enumerate" bA
\begin{enumerate}
\item $0
\end{enumerate}
endsnippet
snippet alph "Alphabet Enumerate" bA
\begin{enumerate}[label= (\alph*)]
\item $1
\end{enumerate} $0
endsnippet
snippet desc "Description" bA
\begin{description}
\item[$1] $2
\end{description} $0
endsnippet
snippet table "Table" b
\begin{table}[${1:htpb}]
\centering
\caption{${2:caption}}
\label{tab:${3:label}}
\begin{tabular}{${5:c}}
$6${5/((?<=.)c|l|r)|./(?1: & )/g}
\end{tabular}
\end{table} $0
endsnippet
snippet ltable "Long table" b
\begin{longtable}{${1:|p{5cm}|p{10cm}|}}
\hline
$2
\hline
\end{longtable} $0
endsnippet
snippet --- "hline" iA
\hline
endsnippet

2
scripts/timereset Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
sudo systemctl restart systemd-timesyncd.service

View File

@ -7,6 +7,7 @@
\RequirePackage{setspace} \RequirePackage{setspace}
\RequirePackage{geometry} \RequirePackage{geometry}
\RequirePackage{indentfirst} \RequirePackage{indentfirst}
\RequirePackage{longtable}
\doublespacing \doublespacing
\geometry{top=20mm,bottom=20mm} \geometry{top=20mm,bottom=20mm}

View File

@ -1,5 +1,5 @@
\ProvidesClass{mathhw} \ProvidesClass{mathhw}
\LoadClass[fontsize=9pt]{scrartcl} \LoadClass[fontsize=9pt, paper=a4, pagesize, DIV=calc]{scrartcl}
\RequirePackage[utf8]{inputenc} \RequirePackage[utf8]{inputenc}
\RequirePackage{amsfonts, amsmath, amssymb, amsthm} \RequirePackage{amsfonts, amsmath, amssymb, amsthm}