As of build v0.7.4 swapping lines up and down is available as a Ctrl-P or hotkey function.
It would be very useful and convenient if this feature respected folded content as a single entity. If a section is folded and I swap the section up or down a line, everything in the fold should move with it.
Recognizing the fold state like this would allow users to easily organize larger sections of their work without losing any of the granular line shifting ability that we have when working with unfolded content. Used in combination with the other new shortcut, toggling the fold, a powerful and efficient organization workflow emerges.
As a side comment, shifting folded content as the feature currently works feels buggy because it’s acting on content we can’t see. It’s a little disconcerting.
v0.13.5 Shiny new things - You can now use drag and drop to re-arrange heading sections from the Outline pane. - You can also drop an outline item into the editor to generate a heading link.
It’s not quite the same as hotkeys for arranging sections while immersed in writing, but it’s such welcome addition! Probably good enough for most of our needs.
You can’t move folded text up/down. Instead, just the first line of the folded text block moves and the folded content under it stays in place, messing up everything.
In addition, if I move any (non-folded) line up/down (with the keyboard shortcut), I would expect for the line to jump over the folded block. Instead it moves inside the fold, as if the text was not folded.
This is not WYSIWYG behavior. It works as if the text was not actually folded, which makes no sense
+1 to this. It’s also a bit cumbersome how it will unfold your section as you try to move things past it.
There is a workaround for moving the block itself: If you select the folded line, when you use the Move line up and Move line down commands, it will automatically block select the entire folded content, and move it as one. But, it also unfolds it.
(Also this seems familiar. I think there might be an existing FR, but maybe it’s worded differently.) Maybe this one, which has a lot of discussion: Navigate, move, indent and unindent by heading
At least for me, the move line up/down commands do not move the whole folded content, just the first line. (It’s part of my original complaint
Using the outline to drag & drop kinda works as a (cumbersome) workaround, but only for headings. I often fold indented bullet/checkbox lists under an item that is not a headline, so it doesn’t show up in the outline.
Oh BTW, @rigmarole , this thread is tagged “editor-legacy”, but the problem is with the new editor. I hope this feature request isn’t being ignored because of that?
I can do it with the keyboard. I’ve never purposefully moved text with a mouse. Are you sure you’re selecting the line break? (By selecting just below the folded line as well. That might not be the “line break”. That might actually be what causes the entire fold to get selected.)
(And again, I do acknowledge this is just a workaround.)
Ahh sorry, now I see what the problem is… I completely forgot that the “Select Line” keyboard shortcut is provided by the (essential) Code Editor Shortcuts plugin. If I use the standard (two-step) way of selecting a line, it sort of works. Except it unfolds the folds, as mentioned.
This is probably useful info in case the plugin could maybe be fixed to work at least like this, even if it would still be better to be able to move folded blocks around without unfolding them first.