As for Navigating and Moving full sections, we would like keyboard shortcuts that move whatever section the cursor is in collectively as a unit up or down.
When implementing this feature, there is some important hierarchy logic to follow.
One essential detail is that a section that is being moved should naturally contain all of its subsections and move them collectively.
Another essential detail is that the section being moved should never switch places with another section that is of a lower level. Considering this example:
# A1
## A2
### A3
# B1
## B2
### B3
When moving B1 up one position, it should look like this:
# B1
## B2
### B3
# A1
## A2
### A3
Not like this:
(scrambles your content too easily)
# A1
## A2
# B1
## B2
### B3
### A3
However there are plenty of use cases where a subsection would be moved to a different parent section, like this:
# A1
# B1
## B2
### B3
## A2
### A3
Here’s my current workaround. But just because there’s a workaround doesn’t mean the feature isn’t needed
This workaround can be prone to mistakes if you’re not careful.
- Enable Settings>Core>Editor>Fold Headings
- Fold a section (or sections) you want to shift up or down in your document
- Select the folded line(s)
- Mouse drag them to the new position (or cut/paste)
This is slightly less error prone than selecting a section and cut/pasting it somewhere else. The folding ensures that you don’t accidentally miss anything in that section.
Note that the “Swap line up” and “Swap line down” commands are problematic for lines that have a folded section. Please add “Swap section up” and “Swap section down” commands in a future release.