Is there a way to emulate the Word (ugh) Outline view behavior of collapse to different levels?

image

“Expand the first layer of the entire focused pane”:

  1. focus on the pane title: focus_first: meta+home
  2. collapse all below the cursor: collapse_all in the command palette
  3. expand: meta+down

“duplicate the third” will be the “expand the second layer of the entire focused pane”.

–