diff options
Diffstat (limited to '')
| -rw-r--r-- | .config/nvim/after/ftplugin/markdown.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/nvim/after/ftplugin/markdown.lua b/.config/nvim/after/ftplugin/markdown.lua new file mode 100644 index 0000000..538a6da --- /dev/null +++ b/.config/nvim/after/ftplugin/markdown.lua @@ -0,0 +1,9 @@ +vim.opt_local.makeprg = + 'pandoc -s -f markdown+wikilinks_title_after_pipe+autolink_bare_uris -t html -o /tmp/%.html %' + +vim.api.nvim_buf_create_user_command(0, 'OpenWeb', function() + local name = vim.fn.expand('%') + vim.system({ 'xdg-open', '/tmp/' .. name .. '.html' }) +end, { desc = 'markdown: open pdf' }) + +vim.keymap.set('n', '<leader>o', '<cmd>OpenWeb<cr>', { desc = 'markdown: open web', buffer = 0 }) |