Collapse Comments

It would be nice if comments made via the %% <comment> %% syntax could be collapsed in the editor in the same way headings are collapsed such that they don’t pollute the view. Keeping the first line could serve description purposes.

Example:

%% short description
lengthy comment
%%

could turn into

%% short description ...
6 Likes

As a workaround, you can switch to reading view (obviously this doesn’t leave a descriptive line).

Thanks for pointing that out. The drawback here is that the layout also changes, which I find disruptive, especially for formulas and long paragraphs, where the slight differences in text width accumulate.

I second this! My use case is that I basically have a lot of metadata in a large comment in the beginning of each note (it’s like frontmatter, but doesn’t get published in Publish, and the internal and external links work there). I’d really like to make it collapsible, like frontmatter.

Sample:

%%
parent:: [[Parent]]
tags:: #d/2023/05/25
url:: [topic](https://forum.obsidian.md/t/collapse-comments/52240/2)
%%