Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function! PandocOpen(filetype)
let l:fpath = '/tmp/' . expand('%:t:r') . '.' . a:filetype
execute '!pandoc -s --highlight-style breezedark -o ' . l:fpath . ' %; xdg-open ' . l:fpath
endfunction
nnoremap <silent> <leader>oh :<C-u>call PandocOpen("html")<CR>
nnoremap <silent> <leader>oo :<C-u>call PandocOpen("html")<CR>
nnoremap <silent> <leader>op :<C-u>call PandocOpen("pdf")<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.