I'm interested in hiding comments in code or structured text, but displaying them in another window; i.e. same buffer, two windows side-by-side, one showing the main text (code, or content), but hiding or minimizing comments, and the other window showing comments, but hiding or minimizing everything else.
Importantly these should track each other, similar to how a git merge application appears and functions. This is similar to, but not precisely the same as collapsible sections that you commonly see in an IDE. I think this could be useful when writing code, though in this case the problem that prompted me to originally post this question as follows:
I'm writing fiction, loosely in markdown, though the exact markup is not so important. The important thing is that in addition to my fiction text, I have notes formatted as comments, and "commented out" passages of fiction that I'd like to retain in place, at least temporarily, for one reason or another. The problem is that these can interfere with my reading of the main text. What I'd like is something akin to Word's margin comments, but presented much like a git merge application, but being a single file buffer.
Before going through the trouble of writing an emacs mode for this, I'm wondering if there are any existing packages that might do something like this.