Is there an option for 'follow hints' like in Qutebrowser & Alacritty?

27 views
Skip to first unread message

Angelo Machils

unread,
May 14, 2022, 11:04:05 AMMay 14
to iterm2-discuss
Hello,

After a hiatus from macOS, I'm back on that platform and installed iTerm2. One thing I can't find (if it's even possible) is an option to have certain link (also callback urls) selectable and being able to open them with the keyboard. Something like the 'follow hints' option in Qutebrowser. Alacritty has this option and I've gotten quite used to it.


---
With regards,

Angelo Machils

Richard Mitchell

unread,
May 14, 2022, 1:27:36 PMMay 14
to iterm2-discuss
Can you give an example how the links would appear in the terminal?

Angelo Machils

unread,
May 14, 2022, 2:50:28 PMMay 14
to iterm2-discuss
In Alacritty, there is a keyboard shortcut and it results in:
Screenshot 2022-05-14 at 21.43.42.pngScreenshot 2022-05-14 at 21.43.03.png
As you can see, it doesn't only work on URLs, one can define RegEx definitions to Hook URLs or DEVONthink or whatever has a callback URL. It also works in tui applications, like Neomutt.


---
With regards,

Angelo Machils

George Nachman

unread,
Jun 16, 2022, 1:08:16 PMJun 16
to iterm2-...@googlegroups.com
You can use Edit > Find > Find URLs (cmd-opt-U) to select all urls. Then you can navigate among search results as usual with cmd-G and cmd-shift-G. You can open the current selection with Edit > Open Selection (cmd-opt-O). It’s not quite as fast as the system you described, but I find it gets the job done.

--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/cadadbe1-16dc-4a44-8149-52f4d6026a81n%40googlegroups.com.




Aaron Meurer

unread,
Jun 16, 2022, 3:15:25 PMJun 16
to iterm2-...@googlegroups.com
Nice. I didn't know about this feature. I would suggest updating the regex you are using to match URLs to not match trailing punctuation like dots, parentheses, and so on, as those commonly appear at the end of a URL when a URL is written inside of a sentence. 

Aaron Meurer

Angelo Machils

unread,
Jun 16, 2022, 3:39:39 PMJun 16
to iterm2-discuss
Hello,

Thank you for the answer. It's usuable, but as you said, quite a bit slower (and more cumbersome tbh, sorry to be blunt). But what I miss the most is the fact that the way Alacritty (and Qutebrowser to some extend) offer is the extensibility. When I change the config of Alacritty, I can make it work with any application that has a call-back URL, in my case EagleFiler, DEVONthink, Hook, etc.... iTerm2 seems to be limited to web urls.


---
With regards,

Angelo Machils

Angelo Machils

unread,
Jun 17, 2022, 5:38:53 AMJun 17
to iterm2-discuss
Perhaps I should eleborate on the 'cumbersome' part a bit. For example, I use TaskWarrior for my project/task management and some of the lists/projects have between 50-60 tasks, all of which have at least one (web or call-back) URL in it's annotation. If I need a link that's at no. 10 (for example) from the top, I need to CMD-G quite a lot :).
Also, I just noticed that in an application like Neomutt, iTerm2 'moves' or rather starts scrolling through the buffer if the link is above the middle (it doesn't seem to happen if the link is lower down). It's a bit hard to explain, but perhaps this screenshot will make it clear:
Screenshot 2022-06-17 at 12.30.34.png



---
With regards,

Angelo Machils
Reply all
Reply to author
Forward
0 new messages