From 5f51ce5761d0f1d5b1fe2129c2e97a044fca8710 Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Fri, 14 Oct 2022 14:36:19 -0500 Subject: Add shortcuts to Vim (make & comment lines) --- vim/fun.vim | 3 ++- vim/vimrc | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'vim') diff --git a/vim/fun.vim b/vim/fun.vim index 25b71ca..56cae24 100644 --- a/vim/fun.vim +++ b/vim/fun.vim @@ -51,7 +51,8 @@ command Md2Pdfms call Md2Pdfms() function! Md2Html ( ) exe ":w" - exe ":! pandoc -s --toc -H ~/mahcode/markdown/pandoc/pandoc_style.html --highlight-style tango -o \"" . expand("%:r") . ".html\"" . " \"" . expand("%") . "\"" + "exe ":! pandoc -s --toc -H ~/mahcode/markdown/pandoc/pandoc_style.html --highlight-style tango -o \"" . expand("%:r") . ".html\"" . " \"" . expand("%") . "\"" + exe ":! pandoc --highlight-style tango -o \"" . expand("%:r") . ".html\"" . " \"" . expand("%") . "\"" echo "html saved as " . expand("%:p:r") . ".html" endfunction diff --git a/vim/vimrc b/vim/vimrc index 33aed79..2c59186 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -153,7 +153,7 @@ map :tabn " C/C++ Programming: -map :w:make +map :w:!clear && make "map :!./%:r "map :!./a.out @@ -209,7 +209,7 @@ nnoremap :NERDTreeToggle " - https://stackoverflow.com/a/9051932/7498073 au FileType haskell,vhdl,ada let b:comment_leader = '-- ' au FileType vim let b:comment_leader = '" ' -au FileType c,cpp,java let b:comment_leader = '// ' +au FileType c,cpp,java,asciidoc let b:comment_leader = '// ' au FileType sh,make let b:comment_leader = '# ' au FileType tex let b:comment_leader = '% ' " That c_CTRL-R_= thingy enters the "expression register". And that \V -- cgit v1.2.3