I have no idea

This commit is contained in:
iris committed 2023-02-06 01:52:42 -05:00
1 parent c4f2a1e4cb
commit d069cc3ac0
15 files changed
+176 -75

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
local u = require 'config.utils'
local g = vim.api.nvim_create_augroup('preview', {})
vim.api.nvim_create_autocmd('BufWritePost', {
group = g,
pattern = '*.tex',
callback = function(arg)
local dir = arg.file:match('.*/')
local args = ''
if dir ~= nil then
args = '-output-directory=\''..dir..'\' '
end
vim.cmd('silent exec "!pdflatex '..args..'\''..arg.file..'\'"')
end
})