From 9c03aadf1f5d6f1e51cdcafde007acbadb507f74 Mon Sep 17 00:00:00 2001 From: mitsuo Date: Tue, 19 Oct 2021 23:21:36 -0500 Subject: Add gt (Go TitleCase) mapping in Vim - bashrc: Remove Conda shit (messed with my printer and scanner! (hplip(1)) - bash_aliases: - Add some Env. Var. like LINDO - Add mpv_nhk - Add youtube-dl_fast - Add "path shorcut" to java8 --- fun.vim | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'fun.vim') diff --git a/fun.vim b/fun.vim index b184d4c..0dbfe11 100644 --- a/fun.vim +++ b/fun.vim @@ -32,13 +32,14 @@ command LongestLineLength call LongestLineLength() function! Md2Pdf ( ) exe ":w" - exe ":! pandoc -o " . expand("%:r") . ".pdf -t latex -N --variable classoption=twosides --variable papersize=a4 --variable margin-left=1in --variable margin-right=1in --variable margin-top=1in --variable margin-bottom=1in --variable links-as-notes --variable colorlinks --variable pagestyle=plain --variable documentclass=article " . expand("%") - echo "pdf saved as " . expand("%:p:r") . ".pdf" + "-N for numbered headers + exe ":! pandoc -o \"" . expand("%:r") . ".pdf\" -t latex --variable classoption=twosides --variable papersize=a4 --variable margin-left=1in --variable margin-right=1in --variable margin-top=1in --variable margin-bottom=1in --variable links-as-notes --variable colorlinks --variable pagestyle=plain --variable documentclass=article -f markdown-implicit_figures \"" . expand("%") . "\"" + echo "pdf saved as \"" . expand("%:p:r") . ".pdf\"" endfunction function! Md2Pdfms ( ) exe ":w" - exe ":! pandoc -o " . expand("%:r") . ".pdf" . " -t ms -N " . expand("%") + exe ":! pandoc -o " . expand("%:r") . ".pdf" . " -t ms -f markdown-implicit_figures \"" . expand("%") . "\"" echo "pdf saved as " . expand("%:p:r") . ".pdf" endfunction @@ -50,7 +51,7 @@ command Md2Pdfms call Md2Pdfms() function! Md2Html ( ) exe ":w" - exe ":! pandoc -o " . expand("%:r") . ".html" . " -s -N " . expand("%") + exe ":! pandoc -o \"" . expand("%:r") . ".html\"" . " -s \"" . expand("%") . "\"" echo "html saved as " . expand("%:p:r") . ".html" endfunction @@ -66,3 +67,17 @@ function! CompRunProj ( ) endfunction command CompRunProj call CompRunProj() + + +" Function made to give feedback to students code in 1INF01 + +" export C code to syntax highlighted pdf +function! C2Pdf ( ) + exe ":set ts=4" + exe ":w" + exe ":ha > %.ps" + exe ":!ps2pdf %.ps" + exe ":!rm %.ps" +endfunction + +command C2Pdf call C2Pdf() -- cgit v1.2.3