From 60ad87699fcf0dc19a72e21c688c3558f15ac19b Mon Sep 17 00:00:00 2001 From: Xfnw knuu Date: Tue, 12 Jan 2021 23:49:21 -0500 Subject: [PATCH] move vimrc and convert mandoc to html --- .vim/templates/man.html | 123 ++++++++++++++++++++++++++++++++++++++++ .vimrc => .vim/vimrc | 13 +++-- 2 files changed, 130 insertions(+), 6 deletions(-) create mode 100644 .vim/templates/man.html rename .vimrc => .vim/vimrc (72%) diff --git a/.vim/templates/man.html b/.vim/templates/man.html new file mode 100644 index 0000000..268cb10 --- /dev/null +++ b/.vim/templates/man.html @@ -0,0 +1,123 @@ + + + diff --git a/.vimrc b/.vim/vimrc similarity index 72% rename from .vimrc rename to .vim/vimrc index e1a877c..72e72bc 100644 --- a/.vimrc +++ b/.vim/vimrc @@ -3,16 +3,17 @@ " some custom commands " " insert mom templates -command Tmomc :r ~/Documents/templates/chapter.mom -command Tmomg :r ~/Documents/templates/general.mom -command Tmomr :r ~/Documents/templates/recipe.mom -command Tmome :r ~/Documents/templates/english.mom -command Tmd :r ~/Documents/templates/md.html +command Tmomc :r ~/.vim/templates/chapter.mom +command Tmomg :r ~/.vim/templates/general.mom +command Tmomr :r ~/.vim/templates/recipe.mom +command Tmome :r ~/.vim/templates/english.mom +command Tmd :r ~/.vim/templates/md.html +command Tmh :r ~/.vim/templates/man.html " run groff+refer on file :command Groff !sh -c 'p="%"; refer -PS -e -p ~/Documents/bib ${p::-4}.mom | groff -mom -Tpdf > ${p::-4}.pdf' :command Grofft !sh -c 'p="%"; refer -PS -e -p ~/Documents/bib ${p::-4}.mom | groff -mom -T ascii | sed -b "s/\x1b[^m]*m//g" > ${p::-4}.txt' -:command Man !sh -c 'p="%"; groff -man -T ascii ${p::-4}.man > ${p::-4}.txt' +:command Man !sh -c 'p="%"; mandoc -T html ${p} | cat ~/.vim/templates/man.html - > ${p}.html' :command Md !p="%"; cmark --unsafe ${p::-3}.md | h2p - ${p::-3}.pdf