quarto-dev / quarto

Quarto open-source scientific and technical publishing system
https://quarto.org
GNU Affero General Public License v3.0
280 stars 19 forks source link

Add VS Code support for a rewrap or reflow action for comments #408

Open juliasilge opened 2 months ago

juliasilge commented 2 months ago

If I have a Quarto file like this:

---
title: "About"
---

It is a truth universally acknowledged, that a single man in possession of a good fortune must be in want of a wife.

```{r}
# It is a truth universally acknowledged, that a single man in possession of a good fortune must be in want of a wife.
# 
# However little known the feelings or views of such a man may be on his first entering a neighbourhood, this truth is so well fixed in the minds of the surrounding families, that he is considered as the rightful property of some one or other of their daughters.
# 
# "My dear Mr. Bennet," said his lady to him one day, "have you heard that Netherfield Park is let at last?"
# 
# Mr. Bennet replied that he had not.
# 

1 + 1 


then in RStudio, I can use "Reflow comment" to break up the comments into my chosen line length. I see that VS Code has [this extension](https://open-vsx.org/extension/stkb/rewrap) but it does not work at all in a Quarto document (does nothing).
jinlin82 commented 1 month ago

I have the same problem in quarto mode. In other text mode, rewrap works fine.