tpope / vim-markdown

Vim Markdown runtime files
1.22k stars 191 forks source link

How Can I Make This Work with R Markdown #193

Closed amarakon closed 1 year ago

amarakon commented 2 years ago

This only works for the md filetype, but not the rmd filetype.

awelormro commented 1 year ago

Did you tried with set filetype=markdown?

amarakon commented 1 year ago

Did you tried with set filetype=markdown?

I do not want to change the file type, I want this plugin to work for both file types.

tpope commented 1 year ago

(You do want to change the file type.)

amarakon commented 1 year ago

(You do want to change the file type.)

Then I will lose the extra R Markdown syntax. R Markdown is based on Markdown but with more things added to it. Therefore, this plugin should also apply to the rmd file type.

tpope commented 1 year ago

The rmd syntax file included with Vim loads the syntax file from vim-markdown (also included with Vim) automatically: https://github.com/vim/vim/blob/9d8620b519a84983bc8c24cb6c302f4d6b55a6c0/runtime/syntax/rmd.vim#L70

I didn't make rmd.vim, so I'm not qualified to answer further questions about it.