Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
juliasilge opened this issue Apr 10, 2024 · 2 comments
Open

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

juliasilge opened this issue Apr 10, 2024 · 2 comments

Comments

@juliasilge
Copy link
Collaborator

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 but it does not work at all in a Quarto document (does nothing).

@jinlin82
Copy link

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

@kelly-sovacool
Copy link

kelly-sovacool commented Feb 18, 2025

The current pre-release version of the Rewrap extension fixes this issue: https://github.com/stkb/Rewrap/releases/tag/beta

(Found this PR comment stkb/Rewrap#367 (comment) and confirmed it works for me)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants