time reset
This commit is contained in:
parent
6b182fc571
commit
c76364784e
|
@ -226,15 +226,28 @@ vim.cmd [[
|
|||
augroup END
|
||||
]]
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
vim.api.nvim_create_autocmd({ 'FileType',
|
||||
}, {
|
||||
pattern = "*",
|
||||
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 ]]
|
||||
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 [[
|
||||
-- augroup disabletexlsp
|
||||
-- autocmd!
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
global !p
|
||||
|
||||
# thanks to gilles castel
|
||||
|
||||
def math():
|
||||
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
|
||||
|
||||
snippet beg "begin{} / end{}" bA
|
||||
|
@ -26,4 +33,82 @@ snippet dm "Display Math" wA
|
|||
.\] $0
|
||||
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
2
scripts/timereset
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
sudo systemctl restart systemd-timesyncd.service
|
|
@ -7,6 +7,7 @@
|
|||
\RequirePackage{setspace}
|
||||
\RequirePackage{geometry}
|
||||
\RequirePackage{indentfirst}
|
||||
\RequirePackage{longtable}
|
||||
|
||||
\doublespacing
|
||||
\geometry{top=20mm,bottom=20mm}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
\ProvidesClass{mathhw}
|
||||
\LoadClass[fontsize=9pt]{scrartcl}
|
||||
\LoadClass[fontsize=9pt, paper=a4, pagesize, DIV=calc]{scrartcl}
|
||||
|
||||
\RequirePackage[utf8]{inputenc}
|
||||
\RequirePackage{amsfonts, amsmath, amssymb, amsthm}
|
||||
|
|
Loading…
Reference in New Issue
Block a user