summary refs log tree commit diff
path: root/.config/nvim/after/ftplugin/markdown.lua
blob: 538a6daf6da18fb0a5e6fb28f61457e83a7fc5fb (plain) (blame)
1
2
3
4
5
6
7
8
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 })