[nvim] Improve compilation filetype target
Allows compilation using pandoc to happen for markdown, as well as rmarkdown files.
This commit is contained in:
parent
dcd3f07a8f
commit
3ce896af43
1 changed files with 2 additions and 4 deletions
|
@ -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 <F12> <Plug>(go-def)
|
|||
" installed (it is a bit more brittle)
|
||||
" autocmd FileType rmd noremap <F10> :!echo<space>"require(rmarkdown);<space>render('<c-r>%')"<space>\|<space>R<space>--vanilla<enter>
|
||||
" Compile with rmarkdown
|
||||
autocmd FileType markdown noremap <leader>c :RMarkdown pdf<cr>
|
||||
autocmd FileType markdown noremap <leader>C :RMarkdown! pdf<cr>
|
||||
autocmd FileType markdown,rmarkdown noremap <leader>c :RMarkdown pdf<cr>
|
||||
autocmd FileType markdown,rmarkdown noremap <leader>C :RMarkdown! pdf<cr>
|
||||
|
||||
" Call leaderf with <leader-f> (necessary to enable leaderf lazyloading)
|
||||
nnoremap <leader>F :LeaderfFile<cr>
|
||||
|
|
Loading…
Reference in a new issue