" vim: set fdm=marker et ts=4 sw=4 sts=4: function! pandoc#menu#Init() abort call pandoc#menu#CreateMenu() au! VimPandoc BufEnter call pandoc#menu#CreateMenu() au! VimPandoc BufLeave silent! aunmenu Pandoc endfunction function! pandoc#menu#CreateMenu() abort if index(g:pandoc#modules#enabled, 'command') >= 0 amenu Pandoc.Compile.&Pdf :Pandoc pdf amenu Pandoc.Compile.&Beamer :Pandoc beamer amenu Pandoc.Compile.&ODT :Pandoc odt amenu Pandoc.Compile.&HTML :Pandoc html -s amenu Pandoc.Compile.-Sep1- : if exists('g:pandoc#command#templates_file') for temp in pandoc#command#GetTemplateNames() exe 'amenu Pandoc.Compile.'.temp.' :Pandoc #'.temp.'' endfor endif amenu Pandoc.Compile\ and\ View.Pdf :Pandoc! pdf amenu Pandoc.Compile\ and\ View.Beamer :Pandoc! beamer amenu Pandoc.Compile\ and\ View.ODT :Pandoc! odt amenu Pandoc.Compile\ and\ View.HTML :Pandoc! html -s amenu Pandoc.Compile\ and\ View.-Sep1- : for temp in pandoc#command#GetTemplateNames() exe 'amenu Pandoc.Compile\ and\ View.'.temp.' :Pandoc! #'.temp.'' endfor amenu .699 Pandoc.-Sep1- : endif amenu .900 Pandoc.Help :help pandoc endfunction