moe icon indicating copy to clipboard operation
moe copied to clipboard

Opening URI/URLs with xdg-open

Open tobimensch opened this issue 3 years ago • 1 comments

When the cursor is under a URI/URLs in normal mode and the user presses gf (open file under cursor), moe should detect that the cursor is under a URI/URLs and open it with xdg-open. If the URI is on the local system and can be edited directly by moe, of course it should not use xdg-open and instead be opened by moe directly, for example file:///root/foobar.txt should be opened by moe. In other cases, like http://github.com/ or mailto://[email protected] xdg-open (or similar methods on other platforms) should be used to open this uri.

I also think this feature should be reflected in the syntax highlighting. When URI/URLs are detected under the cursor they should be underlined. I know it's possible to underline characters in the terminal, so this shouldn't be a big problem to get done.

tobimensch avatar Jul 07 '20 16:07 tobimensch

@tobimensch

Good idea.

fox0430 avatar Jul 07 '20 16:07 fox0430