Add asciidoc support
[vimconf.git] / macros.vim
index 046e381283aef870c7ebc0b50008867ff8551ecd..b0c94ddefdd6a4057ee88caf5bb2bd0b8fbfb884 100644 (file)
@@ -102,6 +102,11 @@ function RunMarkdownpy(prog)
 endfunction
 
 
+function RunAsciidoctor()
+  execute ":!asciidoctor " . @%
+endfunction
+
+
 function RunMarkdown()
   if executable("pandoc")
     call RunPandoc()
@@ -115,6 +120,15 @@ function RunMarkdown()
 endfunction
 
 
+function RunAsciidoc()
+  if executable("asciidoctor")
+    call RunAsciidoctor()
+  else
+    echo "No asciidoc implementation found."
+  endif
+endfunction
+
+
 function OnBattery()
   if has('macunix')
     return match(system('pmset -g batt'), "Now drawing from 'Battery Power'") != -1