lynchjames / obsidian-mind-map

An Obsidian plugin for displaying markdown notes as mind maps using Markmap.
MIT License
1.1k stars 77 forks source link

Implement markmap folding commands #103

Open jawspeak opened 1 year ago

jawspeak commented 1 year ago

Implements fold and unfold. See screenshots for keyboard shortcut examples (which is how I have been using this locally for rapid navigation).

I have found my use cases to be: 1) writing / editing a markdown and seeing it realtime update in the mind map (it updates about every second based on the mindmap-view.ts's registerActiveLeafUpdate()) 2) viewing a mindmap and jumping to a specific fold level by keyboard shortcut 3) exploring in an ad-hoc way using my mouse and clicking nodes.

As a design decision / consideration, I did not implement expand / fold next level, because when I mapped to the keyboard shortcuts in the screenshot given, it was very nice for me to jump to a specific fold level, or unfold all. That provided me a muscle memory indication (specific key shortcuts) of exactly which level I was reading, which would not be possible if I was implementing an "increase fold" or "decrease fold" shortcut.

jawspeak commented 1 year ago

Ping @lynchjames please (: