Add a vim keybinding to generate the currently
...open talk
This commit is contained in:
parent
5cab3659f4
commit
d2530a138a
2 changed files with 17 additions and 0 deletions
9
keymaps.lua
Normal file
9
keymaps.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
-- 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 })
|
Loading…
Add table
Add a link
Reference in a new issue