vim-pandoc / vim-rmarkdown

Rmarkdown support for vim
98 stars 26 forks source link

Difference between filetype=rmd and filetype=rmarkdown #28

Open cjber opened 4 years ago

cjber commented 4 years ago

If you give your R Markdown file the .rmd extension the filetype will be set as rmd, this plugin requires the rmarkdown filetype, which is given with a .Rmd extension. As far as I know there isn't any difference between the two and both should be recognised by this plugin.

I currently use autocmd BufRead,BufNewFile *.rmd set filetype=rmarkdown from #11 to solve this issue.

Edit:

Apologies, I had missed that this had been discussed in PR #26. Fwiw I don't have any conflict issues using filetype=rmd so I believe merging #26 should be fine, since the pandoc issue doesn't really apply to R Markdown.

alerque commented 4 years ago

We should recognize whatever filetype (and only whatever filetype) is officially supported upstream in Vim/Neovim. In this case it looks like that is actually rmd. I don't know what is setting/using rmarkdown but if it is us we need to stop it and use the right filetype.

alerque commented 4 years ago

Gah. I'd forgotten I'd already been down this rabbit hole!

jolars commented 2 years ago

I'm not proficient with vimscript and vim plugins, but isn't this the place?

https://github.com/vim-pandoc/vim-rmarkdown/blob/a1787cb55e45b8778eaed7b392648deb4706cd0b/ftdetect/rmarkdown.vim#L1-L4