From 3d4887349318f43dadf1de00ad15e35ba7812a84 Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Sun, 19 Mar 2023 23:31:18 -0500 Subject: Smol formatting changes in vim/ --- vim/fun.vim | 6 ------ vim/vimrc | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/vim/fun.vim b/vim/fun.vim index 56cae24..bd911f9 100644 --- a/vim/fun.vim +++ b/vim/fun.vim @@ -1,5 +1,4 @@ " Echoes longest line number and lenght. - function! LongestLineLength ( ) let maxlength = 0 let linenumber= 1 @@ -29,7 +28,6 @@ command LongestLineLength call LongestLineLength() " to work even after reading that manual section like 2 times. Also, there are " variables that are lists of other variables that I don't know how to make them " work (e.g. geometry=[top=1in, bottom=1in, heightrounded]) - function! Md2Pdf ( ) exe ":w" "-N for numbered headers @@ -48,7 +46,6 @@ command Md2Pdfms call Md2Pdfms() " Save markdown document and export to html using pandoc - function! Md2Html ( ) exe ":w" "exe ":! pandoc -s --toc -H ~/mahcode/markdown/pandoc/pandoc_style.html --highlight-style tango -o \"" . expand("%:r") . ".html\"" . " \"" . expand("%") . "\"" @@ -59,7 +56,6 @@ 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("%") . "\"" @@ -70,7 +66,6 @@ command Md2Odt call Md2Odt() " Compiles and Runs a C++ project - " TODO: how to add program's arguments or file redirectioning from command. function! CompRunProj ( ) exe ":w" @@ -82,7 +77,6 @@ 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" diff --git a/vim/vimrc b/vim/vimrc index 2c59186..f97a654 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -19,7 +19,6 @@ " Get the first directory from the list in $VIMRUNTIMEPATH let $VIMFILES=split(&rtp,",")[0] set undodir=$VIMFILES/undo -set viminfofile=$VIMFILES/viminfo set viewdir=$VIMFILES/view set directory=$VIMFILES/swap set viminfofile=$VIMFILES/viminfo @@ -195,7 +194,7 @@ vmap gt :s/\<\(\w\)\(\w*\)\>/\u\1\L\2/g " Autoformat JSON jumbled data. (Selects the whole file as range to pass as " standard input to `jq .` which pretty prints JSON. Then replace range with " output.) -" Thankyou: https://stackoverflow.com/questions/26214156/how-to-auto-format-json-on-save-in-vim +" Ref.: https://stackoverflow.com/questions/26214156/how-to-auto-format-json-on-save-in-vim nnoremap gJ :%!python3 -m json.tool " :%!jq . -- cgit v1.2.3