Merge branch 'dev' into mercury

nvim: fix tex `env` snippet
        add keymaps for pdf viewer pop-up
This commit is contained in:
David JULIEN 2023-01-21 12:45:51 +01:00
commit 35dcedbdf8
Signed by: swytch
GPG Key ID: 498590A3AA82A06F

View File

@ -18,6 +18,18 @@ vim.keymap.set("i", "EE", "É")
vim.keymap.set("i", "<Space>etc", "\\,etc.") vim.keymap.set("i", "<Space>etc", "\\,etc.")
vim.keymap.set("i", "<Space>:", "\\,:") 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 -- Snippets
local ls = require("luasnip") local ls = require("luasnip")
@ -81,8 +93,10 @@ ls.add_snippets("tex", {
s("env", { s("env", {
t({ "\\begin{" }), t({ "\\begin{" }),
i(1, "foo"), i(1, "foo"),
t({ "}", "\t" }), t({ "}"}),
i(2), i(2),
t({ "", "\t" }),
i(3),
t({ "", "\\end{" }), t({ "", "\\end{" }),
f(copy,1), f(copy,1),
t({ "}"}), t({ "}"}),