Merge branch 'dev' into thesis

nvim: fix tex `env` snippet
        add keymaps for pdf viewer popup
This commit is contained in:
David JULIEN 2023-01-20 10:45:30 +01:00
commit d1e3350445
No known key found for this signature in database
GPG Key ID: 1DD6B2BA6DD78810

View File

@ -18,6 +18,18 @@ vim.keymap.set("i", "EE", "É")
vim.keymap.set("i", "<Space>etc", "\\,etc.")
vim.keymap.set("i", "<Space>:", "\\,:")
-- pdf viewer
vim.keymap.set("n", "<leader>zm",
":!$READER main.pdf &<CR><CR>",
{ desc = "Open $READER on pdf of current file" }
)
vim.keymap.set("n", "<leader>zz",
":!$READER <C-r>=expand('%:r')<cr>.pdf &<cr><CR>",
{ desc = "Open $READER on pdf of current file" }
)
-- Snippets
local ls = require("luasnip")
@ -81,8 +93,10 @@ ls.add_snippets("tex", {
s("env", {
t({ "\\begin{" }),
i(1, "foo"),
t({ "}", "\t" }),
t({ "}"}),
i(2),
t({ "", "\t" }),
i(3),
t({ "", "\\end{" }),
f(copy,1),
t({ "}"}),