Multiple views of a single leo file

47 views
Skip to first unread message

Karthik Suresh

unread,
Nov 2, 2023, 9:20:52 AM11/2/23
to leo-editor
Hi,

I am working on a project with Leo and trying to integrate with the Laravel framework. As I edit automatically generated code, I create clones and then group them so I can work on them more quickly. Quite soon, I end up with a large file tree and it's tricky to switch between one and the other. Is there an approach where we can have multiple windows open for the same leo file - like a new window in Word so it's possible to work on different areas in the same document?

Thanks for any advice.

Kind regards,
Karthik

Edward K. Ream

unread,
Nov 2, 2023, 9:32:27 AM11/2/23
to leo-e...@googlegroups.com
On Thu, Nov 2, 2023 at 8:20 AM Karthik Suresh <k.su...@jayamony.co.uk> wrote:

Is there an approach where we can have multiple windows open for the same leo file - like a new window in Word so it's possible to work on different areas in the same document?

Leo will warn if you open the same outline twice. You will lose work if you modify both, but you could treat one as read only.

Another approach is to add an editor with the add-editor command. This feature is tricky to use, but you might find it helpful.

Edward

Karthik Suresh

unread,
Nov 2, 2023, 10:07:37 AM11/2/23
to leo-e...@googlegroups.com

Thanks for the advice. I did lose data trying to make changes in both files, so switched to trying the add-editor approach. As you say, there is a learning curve and it is a little tricky to use, but I'm managing to make it work. 

Karthik

Thomas Passin

unread,
Nov 2, 2023, 10:08:19 AM11/2/23
to leo-editor
If you want to work on a single node in a second view, the Freewin plugin will do that.  You can open a Freewin window on any node, and each FW window will remain locked to its node, so you can arrange several of them along with the main Leo window.  The Freewin window contains a text editor - not a full-fledged Leo body editor but still useful - and changes in the FW window get incorporated in the parent's body, and also changes in the parent get reflected in the FW window.

In this way, you can navigate in the tree as usual, while being able to keep looking at and editing any particular nodes you are interested in.

Otherwise, I mark nodes of interest and jump between them using these Leo commands and shortcut keys:

goto-next-marked = F4
mark = F9  # This is a toggle command
unmark-all = F10

I don't like add-editor because I always lose track of what node an added editor is looking at - it will change as you navigate the tree if it is focused at the time.  I always end up typing into the wrong node.  FW avoids that problem.

Edward K. Ream

unread,
Nov 2, 2023, 1:19:00 PM11/2/23
to leo-e...@googlegroups.com
On Thu, Nov 2, 2023 at 9:08 AM Thomas Passin <tbp1...@gmail.com> wrote:
If you want to work on a single node in a second view, the Freewin plugin will do that. 

Cool. I had forgotten about that plugin :-)

Edward
Reply all
Reply to author
Forward
0 new messages