From c1358ee8d9ccecace7cbfb231a9738bbb6e770a0 Mon Sep 17 00:00:00 2001 From: mitsuo Date: Sun, 3 Apr 2022 02:57:41 -0500 Subject: Add custom css to Md2Html Custom css is in ~/mahcode/pandoc/pandoc_style.css I don't know a better place to place it. I don't think it belongs inside the vim directory. If I'm going to take notes on another machine, then I need to have ~/mahcode in there too. mahcode is mahcode --- vim/fun.vim | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/vim/fun.vim b/vim/fun.vim index 0dbfe11..25b71ca 100644 --- a/vim/fun.vim +++ b/vim/fun.vim @@ -51,12 +51,23 @@ command Md2Pdfms call Md2Pdfms() function! Md2Html ( ) exe ":w" - exe ":! pandoc -o \"" . expand("%:r") . ".html\"" . " -s \"" . expand("%") . "\"" + exe ":! pandoc -s --toc -H ~/mahcode/markdown/pandoc/pandoc_style.html --highlight-style tango -o \"" . expand("%:r") . ".html\"" . " \"" . expand("%") . "\"" echo "html saved as " . expand("%:p:r") . ".html" endfunction command Md2Html call Md2Html() +" Save markdown as ODT file (.docx is also possible) + +function! Md2Odt ( ) + exe ":w" + exe ":! pandoc -s --toc -H ~/mahcode/markdown/pandoc/pandoc_style.html --highlight-style tango -o \"" . expand("%:r") . ".odt\"" . " \"" . expand("%") . "\"" + echo "ODT saved as " . expand("%:p:r") . ".odt" +endfunction + +command Md2Odt call Md2Odt() + + " Compiles and Runs a C++ project " TODO: how to add program's arguments or file redirectioning from command. -- cgit v1.2.3