Bug 399810

Summary: URL recognition + underline on hover + clickable
Product: [Applications] kate Reporter: Gregor Mi <codestruct>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: wishlist CC: nate, thomas.surrel
Priority: NOR Keywords: usability
Version: 18.08.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Gregor Mi 2018-10-14 18:28:05 UTC
Would it be feasible to write a plugin that:

1) Scans for URLs in the current view
2) Underlines them on mouse hover; only on hover so that the general text picture is not disturbed
3) Shows a little popup menu (or make it (Ctrl+)clickable or add a context menu) to open the URL with the default handler (and/or copy it to the clipboard).

Similar to how Konsole is handling URLs.

As an optional bonus, it might be cool if there was a tooltip that shows actual html title if the URL points to a web page; e.g. if there is a link to a Bugzilla bug or a Phabricator page, one could see the bug description or Differential title at one glance without opening the browser.
Comment 1 Nate Graham 2018-10-17 14:04:47 UTC
Ooh, this would be really nice.
Comment 2 Dominik Haumann 2018-10-20 17:23:39 UTC
Yes, all that is feasible. Where is the code on Konsole to scan for URLs?
Comment 3 Dominik Haumann 2018-10-20 17:28:37 UTC
Btw, this was requested already in 2004: bug #93087

Nowadays, a plugin needs to add a KTextEditor::MovingRange to matching texts, and on hover change the MovingEanges KTextEditor::Attribute. All a dimple thing.
Comment 4 Dominik Haumann 2018-10-20 17:35:20 UTC

*** This bug has been marked as a duplicate of bug 93087 ***