From 3ce896af43e2c0fc1e650e1b2eeb8d5e7ff336a1 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Sep 2019 23:23:43 +0200 Subject: [PATCH] [nvim] Improve compilation filetype target Allows compilation using pandoc to happen for markdown, as well as rmarkdown files. --- .config/nvim/init.vim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 000178d..606cd18 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -145,8 +145,6 @@ augroup END au! BufRead,BufNewFile *.markdown set filetype=markdown au! BufRead,BufNewFile *.md set filetype=markdown au! BufRead,BufNewFile *.mkd set filetype=markdown -au! BufRead,BufNewFile *.rmd set filetype=markdown -au! BufRead,BufNewFile *.Rmd set filetype=markdown " automatically enables markdown plugins for md & txt files function! Prose() call plug#load('vim-pencil') @@ -499,8 +497,8 @@ au FileType go nnoremap (go-def) " installed (it is a bit more brittle) " autocmd FileType rmd noremap :!echo"require(rmarkdown);render('%')"\|R--vanilla " Compile with rmarkdown -autocmd FileType markdown noremap c :RMarkdown pdf -autocmd FileType markdown noremap C :RMarkdown! pdf +autocmd FileType markdown,rmarkdown noremap c :RMarkdown pdf +autocmd FileType markdown,rmarkdown noremap C :RMarkdown! pdf " Call leaderf with (necessary to enable leaderf lazyloading) nnoremap F :LeaderfFile