Created
July 2, 2018 11:19
-
-
Save ironhouzi/3b6e7b59db88d5c63f063a997033cf16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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