Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command to show link URL without opening it #3994

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ehdr
Copy link

@ehdr ehdr commented Jan 24, 2022

Description

You may want to see the URL of a link before you open it with f/F, e.g. to make sure it's not malicious. This change introduces a new LinkHints.activateModeToShowLinkUrl mode, bound to sf by default, that lets you choose a link on the page, and will show the corresponding URL in the HUD.

You may want to see the URL of a link before you open it with `f`/`F`. This
change introduces a new `LinkHints.activateModeToShowLinkUrl` mode, bound
to `sf` by default, that lets you choose a link on the page, and will
show the corresponding URL in the HUD.
if (link.href != null) {
let url = link.href;
if (url.slice(0, 7) === "mailto:") { url = url.slice(7); }
if (28 < url.length) { url = url.slice(0, 23) + "...."; }
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unfortunate that it seems the HUD can't display long messages (see screenshot), and thus must truncate long URLs, which partly defeats the purpose of this feature (which is to review the link URL before you follow it). Is there a way around this?

image

@sfmqrb
Copy link

sfmqrb commented Apr 11, 2023

Why this is not merged yet?
useful feature

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants