I would like to be able to fold nested list items in markdown-mode in the same way that it is possible to do in org-mode, so that, for example, the first sub-item in the following list can be easily hidden.
- List item 1
- List item 1.1
- List item 2
The result would look something like the following.
- List item 1 ...
- List item 2
And ideally I would like to be able to use the mouse to fold and unfold the relevant blocks of text, and to have a marker displayed in the left margin to indicate that a block can be, or has been, folded.
From what I've read, it looks like the most promising option may be to use hs-minor-mode, which allows the use of the mouse to fold and unfold blocks, along with hideshowvis, which displays indicators in the margin for the blocks that can be folded, or have been folded, by hs-minor-mode. I've tried out a few other ways of doing the folding that work ok---in particular, selective display, origami, and yafolding---but, as far as I could see, none of them allowed for the use of the mouse to fold and unfold blocks.
I tried to set this up using hs-minor-mode but couldn't get it to work. I think I needed to define a 'forward-sexp' function, or something, but this is beyond my current capabilities.
Has anyone set up markdown-mode to fold nested list items like this? Does anyone have any advice on how I could get it working?