Smart selection with keyboard
Feature Request
Summary
Hi, I want to be able to choose a specific smart selection with the keyboard.
Wezterm and tmux-fingers do this by displaying a 1-3 letters hint next to each match after an action is triggered; entering these letters copies that selection, and using uppercase letters pastes the selection at the current cursor position.
See:
- https://wezfurlong.org/wezterm/quickselect.html
- https://github.com/Morantron/tmux-fingers
- https://old.reddit.com/r/iterm/comments/htvwkd/idea_navigate_smartselection_links_using_keyboard/
Alternatives
Use tmux fingers directly, and always run iterm with tmux. This is not a great solution for 2 reasons:
- It forces us to use a specific terminal app.
- Copying relies on the tmux host copy mechanism, instead of the GUI terminal host. So for example if we run tmux in ssh, then copying will copy to the remote machine's clipboard, instead of the local one.
Are there other ways of accomplishing the same end? Why is this solution superior? For example, would it make more sense for this to use the Python API?
Concerns
As discussed in #9027, using smart-selection as the source for hints is probably a bit problematic, since almost every piece of text can match. Maybe a subset of the rules for smart selection will do?
Thanks a lot for an awesome tool!