With this wiki2html.sh bash script and pandoc program, you can convert markdown to html.
Usage: In the vim list section of the .vimrcfile, include options:
let g:vimwiki_list = [{'path': ‘your_wiki_place',
\ 'path_html': ‘wiki_html_location’,
\ 'syntax': 'markdown',
\ 'ext': '.md',
\ 'custom_wiki2html': ‘link to the custom converter, i.e. wiki2html.sh'}]
If you want to use this converter for temporary wikis then add these to .vimrc:
autocmd FileType vimwiki call SetMarkdownOptions()
function! SetMarkdownOptions()
call VimwikiSet('syntax', 'markdown')
call VimwikiSet('custom_wiki2html', 'wiki2html.sh')
endfunction
:VimwikiAll2HTML and <leader>wh work well.
Just a comment,
sed
does not have an option-r
on Mac (it has NetBSD utilities?). The extended regexps are turned on by-E
. Also it seems the Linux version ofsed
may work with all variants-E, -r, --regexp-extended
.