quarto-dev / quarto

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

Fold all code blocks in `.qmd` file when editing in VSCode #274

Open i-thot-u-wanted2dance opened 11 months ago

i-thot-u-wanted2dance commented 11 months ago

It would be great to have a command that folds all code blocks to "get them out of the way" while working on the text of .qmd file. I work in VSCode, so I have in mind a command that would be accessible from the Command Palette.

(This is reposted from discussion #5643 in the CLI repo, but this is a more appropriate home.)

jjallaire commented 11 months ago

I don't think there is currently a way for us to do this. We could classify all code blocks as "regions" and then call the fold all regions command (but this would effectively disable the region folding capability for qmd)

i-thot-u-wanted2dance commented 11 months ago

Understood. Generally, it would be nice to be able to (temporarily) separately view all of the document's text or all of the document's code. This feature would be handy when working on one or the other for an extended period, especially for relatively long documents. The action of "folding" was perhaps the wrong way to contextualize the broader idea. In any event, maybe someday. Thanks for your great work on this project.