au Filetype c,cpp,objc map <buffer> <S-F11> :FSHere<CR>
au BufNewFile *.{h,hpp,hxx} call AddIncludeGuards()
-au Filetype markdown map <buffer> <F5> :call RunPandoc()<CR>
+au Filetype markdown map <buffer> <F5> :call RunMarkdown()<CR>
" Start interactive EasyAlign in visual mode (e.g. vipga)
vmap <Enter> <Plug>(EasyAlign)
execute ":!pandoc " . cssopts . " --self-contained --toc " . @% . " -o " . @% . ".html"
endfunction
+function RunMarkdownpy(prog)
+ execute ":!" . a:prog . " " . @% . " > " . @% . ".html"
+endfunction
+
+function RunMarkdown()
+ if executable("pandoc")
+ call RunPandoc()
+ elseif executable("markdown2")
+ call RunMarkdownpy("markdown2")
+ elseif executable("markdown_py")
+ call RunMarkdownpy("markdown_py")
+ else
+ echo "No markdown implementation found."
+ endif
+endfunction
+
if filereadable($HOME . '/.vim/macros-local.vim')
source ~/.vim/macros-local.vim