Press ⌘ then click node

46 views
Skip to first unread message

HaveF HaveF

unread,
Jul 26, 2023, 9:05:13 PM7/26/23
to leo-editor
When I was using the features related to Leo and GitHub issues, I discovered...

When the first line of the body of a node contains a URL, you can conveniently open that URL by pressing ⌘ and clicking the node. Leo boasts an abundance of hidden features.

Thomas Passin

unread,
Jul 26, 2023, 11:50:11 PM7/26/23
to leo-editor
Not just the first line - any line with a recognizable URL should show that URL to be highlighted, and a CTRL-Click (or the Apple equivalent) on the highlighted URL will navigate you to it in the browser. CTRL-Clicking can navigate you to:

- A URL, as above;
- a node within a Leo outline (by clicking on a highlighted GNX or UNL);
- A class, method or function definition within the same outline by CTRL-Clicking on it (may not be the definition you want depending on what the search finds first, but it's usually what you want).
- A << named section >> (CTRL-Click on the section name in a node's body, and Leo will navigate you to its expansion in the outline).

There's probably something else I've forgotten just now.

HaveF HaveF

unread,
Jul 27, 2023, 12:42:04 AM7/27/23
to leo-e...@googlegroups.com

Thank you for your addition, Thomas.

I know the CTRL-Click (or the Apple equivalent) on the highlighted URL.


I want to emphasize that in the GitHub Issues node, this is really convenient. Because the default github issues node is like

```

        p.h = f"#{n}: {title}"
        p.b = f"{html_url}\n\n"
        p.b += d.get('body').strip()

```

If you want to see the detail, just click the node's h


image.png


jkn

unread,
Jul 27, 2023, 3:31:08 AM7/27/23
to leo-editor

Yes, this is a very useful feature.

I though we had had discussions about using xdg-open() to open a file manager, so that you could also CTRL-click on

    file:////path/to/a/file/or/directory

and have your file manager come up. That doesn't seem to be working though. Maybe I have forgotten something about it...

HaveF HaveF

unread,
Jul 27, 2023, 3:36:24 AM7/27/23
to leo-e...@googlegroups.com
    file:////path/to/a/file/or/directory

and have your file manager come up. That doesn't seem to be working though. Maybe I have forgotten something about it...
It works on Mac.

lewis

unread,
Jul 27, 2023, 5:19:50 AM7/27/23
to leo-editor
file:///path/to/a/file/or/directory

works on Windows if 3 slashes are used.

jkn

unread,
Jul 27, 2023, 6:12:27 AM7/27/23
to leo-editor
Yes, three slashes works for me as well, and is 'correct' as a URI.

 I am not quite sure why I thought it was four slashes. I think I worked with some app at one point which needed the 'final' slash escaping somehow ... it might have been related to Windows UNC schemes

Anyway, good to know that it all still works

J^n

Thomas Passin

unread,
Jul 27, 2023, 10:21:09 AM7/27/23
to leo-editor
It also works with two slashes: file://.
Reply all
Reply to author
Forward
0 new messages