maphew

Tips

May 30, 2019

How can I navigate to next/previous/parent/child node with the focus staying in the body pane?

Leo has many settings.  It's good to search leoSettings for them.

To answer this question I did the following:

1.  Open leoSettings.leo with <Alt-x>leo-set<tab><return>

2.  Do cff focus:  <Alt-x>cff<return>focus<return>

I see that there is a setting @bool stayInTreeAfterSelect = True

3.  Set this to False in a test file.  Yep, that worked.

From <https://groups.google.com/forum/#!topic/leo-editor/lBTTq_Nm0fQ>

 

Path for Leo file

For any `.leo` file, c.fileName() is the full path to the .leo file. The desired directory is:

base_dir = os.path.dirname(c.fileName())

You (or Leo's code) should then use

g.os_path_finalize_join(base_dir, path_from_headline)

to compute the desired file.

From <https://github.com/leo-editor/leo-editor/issues/1373>