From 9aa69b5c2b6213b17bcc6bcc7bd52c96047029e1 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Thu, 22 Oct 2020 23:35:50 -0400 Subject: Rnw knitr compiling in vim --- .config/nvim/init.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.config/nvim') diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index fee91e3..d4151ab 100755 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -144,6 +144,8 @@ set linebreak " Nvim-R let R_rconsole_width = 0 let R_openpdf = 0 +au BufWritePost *.rmd,*.rnw, silent! :call RWeave("nobib", 1, 1) +au VimLeave *.rmd,*.rnw,*.tex !texclear % " Emmet Expansion let g:user_emmet_leader_key=',' " Enable kite autocompletion @@ -194,7 +196,6 @@ let g:tex_flavor = 'latex' map c :w! \| AsyncRun compiler % autocmd InsertLeave,TextChanged *.gd,*.ms,*.mom :w! | :execute 'silent AsyncRun compiler %' " autocmd InsertLeave *.rmd,*.rnw,*.tex :w! | :execute 'silent AsyncRun compiler %; todotable % TODO FIXME CHANGED XXX IDEA HACK NOTE REVIEW NB BUG QUESTION COMBAK' -autocmd VimLeave *.rmd,*.rnw,*.tex !texclear % map x :w! \| AsyncRun todotable % TODO FIXME CHANGED XXX IDEA HACK NOTE REVIEW NB BUG QUESTION COMBAK TEMP " Have dwmblocks automatically recompile and run when you edit this file in autocmd BufWritePost ~/Compilation/dwmblocks/config.h !cd ~/Compilation/dwmblocks/; make && sudo make install && { killall -q dwmblocks;setsid dwmblocks & } -- cgit v1.2.3