plugins: Change easychair2 url
[vimconf.git] / macros.vim
index d74406055ece5b04f6c1184bcbfe2f7c9340adfd..1da3dae9c56080df7f1cdc01545f006bef4759ac 100644 (file)
@@ -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."