talks/keymaps.lua

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
319 B
Lua
Raw Normal View History

-- Generate the PDF for the currently-open talk.
vim.keymap.set("n", "<leader>gp", function()
local talk_path = vim.fn.expand "%:p"
local talk_name = talk_path:match "src/([^/]+)/"
if talk_name ~= nil then
vim.cmd(string.format("!./run generate %s", talk_name))
end
end, { noremap = true, silent = true })