function RunAsciidoctor()
execute ":!asciidoctor " . @%
+ if executable("asciidoctor-pdf")
+ execute ":!asciidoctor-pdf " . @%
+ elseif executable("asciidoctor")
+ execute ":!asciidoctor " . @%
+ endif
+endfunction
+
+function RunAsciidoctorPdf()
+ execute ":!asciidoctor-pdf " . @%
endfunction
function RunAsciidoc()
- if executable("asciidoctor")
+ if executable("asciidoctor-pdf")
+ call RunAsciidoctorPdf()
+ elseif executable("asciidoctor")
call RunAsciidoctor()
else
echo "No asciidoc implementation found."