Open
Description
Hi,
I am using your plugin with both vim-pandoc and vim-pandoc-syntax as they are required but I can't compile the Rmarkdown documents into any format because I am working with a Windows computer (we all hate Windows but we all need to work for a living). The error is pretty straightforward: the vim function expand("%:p")
that you are using in vim-rmarkdown/autoload/rmarkdown/command.vim (lines 89 and 94) gives the file path using single backslashes which R interprets as if they were escaping characters. The minimal-effort-but-not-so-elegant workaround that I have found is:
45 - let @9 = @+
46 - let @+ = expand("%:p")
...
87 - if output_type == "revealjs_presentation"
88 - let invocation = 'Rscript -e "library(rmarkdown);library(revealjs);render('.
89 - \ 'readClipboard(), '.
90 - \ 'revealjs_presentation()' .
91 - \ render_opts.')"'
92 - else
93 - let invocation = 'Rscript -e "library(rmarkdown);render('.
94 - \ 'readClipboard(), '.
95 - \ output_type_arg .
96 - \ render_opts.')"'
97 - endif
...
123- let @+=@9
This way it should work but now I am getting:
Error: Unrecognized output format specified
Which is because R is not understanding the format type \"html_output\"
. Any idea about how to solve this?
Thanks a lot!
Metadata
Metadata
Assignees
Labels
No labels