diff options
| author | mitsuo <[email protected]> | 2022-04-03 02:57:41 -0500 |
|---|---|---|
| committer | mitsuo <[email protected]> | 2022-04-03 02:57:41 -0500 |
| commit | c1358ee8d9ccecace7cbfb231a9738bbb6e770a0 (patch) | |
| tree | 835deab0cc603a5abfe3d15267e5a747525e2ac7 | |
| parent | b9749714e0a1dcaffb9ed94df4afdcebbcddc9ea (diff) | |
| download | dotfiles-c1358ee8d9ccecace7cbfb231a9738bbb6e770a0.tar.gz dotfiles-c1358ee8d9ccecace7cbfb231a9738bbb6e770a0.tar.bz2 dotfiles-c1358ee8d9ccecace7cbfb231a9738bbb6e770a0.zip | |
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
| -rw-r--r-- | vim/fun.vim | 13 |
1 files changed, 12 insertions, 1 deletions
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. |
