possible to move to nodes without changing docus from body?

40 views
Skip to first unread message

jkn

unread,
Nov 24, 2022, 8:43:11 AM11/24/22
to leo-editor
Hi all
    a simple navigation/key-binding question here:

Is it possible to keep focus in the body pane, whilst navigating the headline tree, and changing the actual node whose body is under the cursor?

I would quite often like to to do this instead of:

- type in body pane
- use cursor to move to nearby node in tree pane (or Alt-T etc)
- click in body pane or type Alt-B to get focus back to body pane
- carry on typing in new node

I haven't seen such an option in the commands, but it's possible I am missing the terminology.

Thanks, jon N

Thomas Passin

unread,
Nov 24, 2022, 9:27:47 AM11/24/22
to leo-editor
CTRL-u and CTRL-d work in the tree pane when the cursor is in the body pane but they don't change the body displayed in the editor pane.  That's a little confusing to me because I expect that the body would always match the selected node in the tree.  Actually, that means that CTRL-u and CTRL-d behave differently depending on whether the starting focus is in the body or the tree.  I'm inclined to think of that as a bug on the grounds that the edit pane should always show the body of the node that is selected in the tree.  Maybe @edward thinks it's a feature instead?

TAB moves the focus back from the tree to the body pane.  I find that pretty easy and natural.

Thomas Passin

unread,
Nov 24, 2022, 9:50:17 AM11/24/22
to leo-editor
After a little more thought, I see I mixed up a couple of things.  Keeping the same body while moving nodes up or down makes sense because the focus is staying on the same node all the time.  It's ALT-uparrow, ALT-downarrow that will change the selected node even if the original focus was in the editor.  And the editor pane reflects the selected tree node, as I expect.  All good, although the focus ends up in the tree, not the body, as the OP would like.  Still, ALT-arrow then TAB seems pretty easy to me.

jkn

unread,
Nov 24, 2022, 12:23:56 PM11/24/22
to leo-editor
Hi Thomas
    yes, CTRL-u / CTRL-d are for reordering nodes (move-outline-up and move-outline-down).

ALT-up and ALT-down (goto-prev-visible and goto-next-visible) do the node traversal, but as you indicate, put/keep focus in the tree pane. I have TAB bound to something other than focus-to-body FWIW. 

I guess I am looking for a version of goto-prev-visible and goto-next-visible that doesn't lose focus from the body pane.

Regards, J^n

Edward K. Ream

unread,
Nov 25, 2022, 7:10:24 AM11/25/22
to leo-e...@googlegroups.com
On Thu, Nov 24, 2022 at 7:43 AM jkn <jkn...@nicorp.f9.co.uk> wrote:

Is it possible to keep focus in the body pane, whilst navigating the headline tree, and changing the actual node whose body is under the cursor?

Have you tried setting @bool stayInTreeAfterSelect = False ?

Edward

jkn

unread,
Nov 25, 2022, 10:51:03 AM11/25/22
to leo-editor
Hi Edward
    No, I haven't, and it looks like it does exactly what I want. Thank you!

Regards, Jon N
Reply all
Reply to author
Forward
0 new messages