Closed reagle closed 10 months ago
I think this can be left to the terminal emulator. For example in iTerm2, you can hold Command and hover over a link to open it.
@zyedidia thanks for the suggestion; two things:
This iTerm2 issue sounds like my own, but not sure what to do about it.
Changing the iTerm2 option to yes
doesn't do anything for me.
It seems the terminal emulator would rather not be able to handle it: for example, how does it know that the whitespace at the beginning of 2nd line in the screenshot (the ruler) is not a part of the wrapped text?
So it seems it should be implemented on the editor level, but rather not in Micro itself but as an external plugin. I think this is exactly a kind of feature to implement in a plugin.
Yeah, this is a good point and should be implemented in the editor at some level. For the time being, you can toggle line numbers (Ctrl-r) and then use iTerm2 to click the link, and then re-enable line numbers.
@zyedidia, ah did not know about the toggle. I imagine I'd have similar problems when using spell checkers which alter the left margin.
Hyperlinks (a.k.a. HTML-like anchors) in terminal emulators proposed a new escape code to open URLs and it is already widely implemented.
Using Wezterm
I am able to open links if they are directly in the shell prompt or in Vi
(just with a single click without any Ctrl
or else) but not in Micro
.
I can propose something like foot's terminal approach
Thank you @pjg11 !
It'd be handy to be able to open a URL if the cursor is located within it, or at least to highlight the URL and perhaps I could then get iTerm to launch it.