summaryrefslogtreecommitdiffstats
path: root/vim
diff options
context:
space:
mode:
authormitsuo <[email protected]>2022-04-03 02:57:41 -0500
committermitsuo <[email protected]>2022-04-03 02:57:41 -0500
commitc1358ee8d9ccecace7cbfb231a9738bbb6e770a0 (patch)
tree835deab0cc603a5abfe3d15267e5a747525e2ac7 /vim
parentb9749714e0a1dcaffb9ed94df4afdcebbcddc9ea (diff)
downloaddotfiles-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
Diffstat (limited to 'vim')
-rw-r--r--vim/fun.vim13
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.