X-Git-Url: https://git.sthu.org/?p=vimconf.git;a=blobdiff_plain;f=macros.vim;h=dd0b28dd605d6cfc81db27bbb59e35b7bc386ed7;hp=55335b1bdb720543c68e54104181e60fc318a2ba;hb=cdf1fddcd88dace1209bff22fee2337ee9ff9a01;hpb=14e415b5bad9aa9f252ffe5749b83b1dec20d9ae diff --git a/macros.vim b/macros.vim index 55335b1..dd0b28d 100644 --- a/macros.vim +++ b/macros.vim @@ -86,6 +86,17 @@ function AddIncludeGuards() endfunction +function RunPandoc() + " If pandoc.css exists, use it + let cssopts = "" + if findfile("pandoc.css", ".") == "pandoc.css" + let cssopts = "-c pandoc.css" + endif + + execute ":!pandoc " . cssopts . " --self-contained --toc " . @% . " -o " . @% . ".html" +endfunction + + if filereadable($HOME . '/.vim/macros-local.vim') source ~/.vim/macros-local.vim endif