Make p paste as children and P as siblings below

After trying part 8c, the user found p and P doing the same thing on the
canvas: both pasted a sibling below the node (P only differed in the
outline's order). Their pick: p pastes under the node, as its last
children, the way a adds a child; P pastes the next siblings, below it,
where o adds one. ]p went away, since p does what it did.

Inside a title p and P still paste after and before the text cursor, as
in vim: they're their own commands (paste-after, paste-before), and the
node ones are paste-as-child and paste-as-sibling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
skkeyeandClaude Opus 5.5 committed 2026-10-02 05:05:00 -04:00
1 parent 7bec5bf3fc
commit bd819409f4
10 files changed
+59 -53

No files matched your search

+7 -1
View File
@@ -254,9 +254,14 @@ pub enum Command {
EditBodyAtStart,
/// `x`: delete just this node; its children move up.
DeleteNode,
/// Inside text: paste after the text cursor.
PasteAfter,
/// Inside text: paste before the text cursor.
PasteBefore,
/// `p` on nodes: paste as the node's last children.
PasteAsChild,
/// `P` on nodes: paste as the node's next siblings.
PasteAsSibling,
Undo,
Redo,
Repeat,
@@ -468,7 +473,8 @@ pub const COMMANDS: &[CommandInfo] = &[
info("outdent-selection", C::Operate(Op::Outdent, Target::Selection), "outdent the selection"),
info("paste-after", C::PasteAfter, "paste after"),
info("paste-before", C::PasteBefore, "paste before"),
info("paste-as-child", C::PasteAsChild, "paste as a child"),
info("paste-as-child", C::PasteAsChild, "paste as children"),
info("paste-as-sibling", C::PasteAsSibling, "paste as siblings below"),
info("undo", C::Undo, "undo"),
info("redo", C::Redo, "redo"),
info("repeat", C::Repeat, "repeat the last change"),