vim-pandoc / vim-rmarkdown

Rmarkdown support for vim
98 stars 26 forks source link

delete default behaviour if OUTPUT_TYPE is omitted #32

Open Quoteme opened 4 years ago

Quoteme commented 4 years ago

Issue:

Until now, omitting "OUTPUT_TYPE" has following behaviour:

If OUTPUT_TYPE is ommited, RMarkdown produces an html document.

But I dislike this, because specifying the desired output format under "output" in the YAML metadata of your document is completely ignored!

Example:

---
title: test
author: Luca Leon Happel
date: 2020-07-11 Sa 02:48 18
output: pdf_document
---

Here is my _really_ fancy text!

produces an html file, when ":RMarkdown" is run!

Possible fix:

Just run :!Rscript -e 'library(rmarkdown);render("%")' would do just what I want.