In certain cases, ftplugin gets in a bad state with R Markdown files where:
FormatRmdSetRmdCommentStrgive errors on loading new or existing buffers into windows. b:did_ftplugin might not be set, but then again, it also happens on new buffers.
I've only noticed this problem with Quarto/R Markdown files but I haven't identified its pattern yet (or why or when ftplugin goes into a state where it gives those errors), but it might happen with other ftplugins. This is a workaround until I discover what the root cause is.
Screenshot.2025-10-24.at.15.21.04.png (view on web)My platform:
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Oct 12 2025 14:37:02) Included patches: 1-1850
https://github.com/vim/vim/pull/18630
(1 file)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Try this patch:
diff --git a/runtime/ftplugin/quarto.vim b/runtime/ftplugin/quarto.vim index a76bcc2c7..f8b27a1a5 100644 --- a/runtime/ftplugin/quarto.vim +++ b/runtime/ftplugin/quarto.vim @@ -1 +1,5 @@ +if exists("b:did_ftplugin") + finish +endif + runtime ftplugin/rmd.vim
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()