X-Git-Url: https://git.sthu.org/?p=vimconf.git;a=blobdiff_plain;f=macros.vim;h=1da3dae9c56080df7f1cdc01545f006bef4759ac;hp=d74406055ece5b04f6c1184bcbfe2f7c9340adfd;hb=HEAD;hpb=8ba36fcf86aa25aee3d8761547f4b95c8786d34e diff --git a/macros.vim b/macros.vim index d744060..1da3dae 100644 --- a/macros.vim +++ b/macros.vim @@ -112,6 +112,15 @@ endfunction function RunAsciidoctor() execute ":!asciidoctor " . @% + if executable("asciidoctor-pdf") + execute ":!asciidoctor-pdf " . @% + elseif executable("asciidoctor") + execute ":!asciidoctor " . @% + endif +endfunction + +function RunAsciidoctorPdf() + execute ":!asciidoctor-pdf " . @% endfunction @@ -129,7 +138,9 @@ endfunction function RunAsciidoc() - if executable("asciidoctor") + if executable("asciidoctor-pdf") + call RunAsciidoctorPdf() + elseif executable("asciidoctor") call RunAsciidoctor() else echo "No asciidoc implementation found."