Skip to content

Commit 1cad25a

Browse files
committed
Rename plugin files using official filetype and deperecated add symlinks
1 parent a2462c6 commit 1cad25a

File tree

6 files changed

+46
-43
lines changed

6 files changed

+46
-43
lines changed

ftdetect/rmarkdown.vim

Lines changed: 0 additions & 4 deletions
This file was deleted.

ftdetect/rmarkdown.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rmd.vim

ftdetect/rmd.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
augroup rmarkdown
2+
au! BufRead,BufNewFile *.Rmd set filetype=rmd
3+
au! BufRead,BufNewFile *.Rpres set filetype=rmd
4+
augroup END

ftplugin/rmarkdown.vim

Lines changed: 0 additions & 21 deletions
This file was deleted.

ftplugin/rmarkdown.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rmd.vim

ftplugin/rmd.vim

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
" vim: set fdm=marker:
2+
3+
" Pandoc: {{{1
4+
" load vim-pandoc {{{2
5+
runtime ftplugin/pandoc.vim
6+
7+
" init vim-pandoc-after, if present {{{2
8+
try
9+
call pandoc#after#Init()
10+
catch /E117/
11+
endtry
12+
13+
" Rmarkdown: {{{1
14+
command! -buffer -bang -nargs=*
15+
\-complete=custom,rmarkdown#command#CommandComplete
16+
\RMarkdown call rmarkdown#command#Command('<bang>', '<args>')
17+
18+
if exists(":NR") == 2
19+
command! -buffer RNrrw call rmarkdown#nrrwrgn#NarrowRChunk()
20+
noremap <buffer> <localleader>ccn :RNrrw<cr>
21+
endif

syntax/rmarkdown.vim

Lines changed: 0 additions & 18 deletions
This file was deleted.

syntax/rmarkdown.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rmd.vim

syntax/rmd.vim

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
runtime syntax/pandoc.vim
2+
PandocHighlight r
3+
" rmarkdown recognizes embedded R differently than regular pandoc
4+
exe 'syn region pandocRChunk '.
5+
\'start=/\(```\s*{\s*r.*\n\)\@<=\_^/ ' .
6+
\'end=/\_$\n\(\(\s\{4,}\)\=\(`\{3,}`*\|\~\{3,}\~*\)\_$\n\_$\)\@=/ '.
7+
\'contained containedin=pandocDelimitedCodeblock contains=@R'
8+
9+
syn region pandocInlineR matchgroup=Operator start=/`r\s/ end=/`/ contains=@R concealends
10+
11+
PandocHighlight python
12+
" rmarkdown recognizes embedded R differently than regular pandoc
13+
exe 'syn region pandocPythonChunk '.
14+
\'start=/\(```\s*{\s*python.*\n\)\@<=\_^/ ' .
15+
\'end=/\_$\n\(\(\s\{4,}\)\=\(`\{3,}`*\|\~\{3,}\~*\)\_$\n\_$\)\@=/ '.
16+
\'contained containedin=pandocDelimitedCodeblock contains=@python'
17+
18+
syn region pandocInlinePython matchgroup=Operator start=/`python\s/ end=/`/ contains=@Python concealends

0 commit comments

Comments
 (0)