vim-rmarkdown icon indicating copy to clipboard operation
vim-rmarkdown copied to clipboard

Difference between filetype=rmd and filetype=rmarkdown

Open cjber opened this issue 5 years ago • 3 comments

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.

cjber avatar Feb 16 '20 18:02 cjber

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 avatar Feb 17 '20 05:02 alerque

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

alerque avatar Feb 17 '20 05:02 alerque

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

jolars avatar Nov 20 '21 18:11 jolars