You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature has previously been mentioned in #189 - one of the comments there figured that issue would be a prerequisite, but Mitchell confirmed on Discord that it's not. Thus, I'm opening this separate issue for it (encouraged by Mitchell's desire to "hear more use cases/requests"). I personally don't have much need for the search scrollback feature, but I would have a hard time giving up kitty's hints feature.
kitty has a hints mode to select and act on arbitrary text snippets currently visible on the screen. For example, you can press ctrl+shift+e to choose any URL visible on the screen and then open it using your default web browser.
Similarly, you can press ctrl+shift+p>f to select anything that looks like a path or filename and then insert it into the terminal, very useful for picking files from the output of a git or ls command and adding them to the command line for the next command.
Those are just a couple examples, but through its flexible options you can go further. I don't leverage all the options, but I do use that second example practically on a daily basis, along with the similar kitty_mod+p>h shortcut to select a hash, which is very useful when working with git commands. I also use kitty_mod+p>w to select words, though not quite as often. In addition to the shortcuts for inserting the selection into the terminal at my current cursor position, I also have mappings to copy each of these types of text to the clipboard (so I can paste them in e.g. a GitHub comment, Slack message, etc.).
FWIW, here are the relevant quotes from the comments in #189:
But why I actually wanted to comment is related to generic search, but a bit more specific: sometimes you actually see what you need on screen, but want to quickly copy/paste/execute it without a mouse. Back when I was using kitty I used hints a lot
I haven't used it myself, but it seems pretty similar to kitty's hints mode. One difference appears to be that the default action is to copy the selection to the clipboard while the action to insert it at the current terminal cursor (i.e. copy and paste the selection, as described in the docs) is achieved by typing the uppercase form of the prefix. In kitty, the --program flag can be configured in more general/flexible ways: in addition to inserting the selection, it can also copy to the clipboard or to a specified buffer, or run the default open program, or launch a specific program in a new kitty tab, window, overlay, etc. That said, I do think WezTerm has the two most common use cases covered.
Edit: It also seems like WezTerm matches all of the configured quick_select_patterns, whereas in kitty you usually filter to a specific kind of pattern like a hash or a file path, since you typically only want to insert a specific type of string at a particular time. But maybe this is possible in WezTerm despite my reading of their docs. Anyway, for Ghostty, I'd vote for making it possible to select a specific type. (If you know you want to select a hash and there are only a few hashes displayed but lots of other matches like file paths, highlighting only hash strings will result in fewer matches/less noise on the screen/shorter prefixes to type.)
This feature has previously been mentioned in #189 - one of the comments there figured that issue would be a prerequisite, but Mitchell confirmed on Discord that it's not. Thus, I'm opening this separate issue for it (encouraged by Mitchell's desire to "hear more use cases/requests"). I personally don't have much need for the search scrollback feature, but I would have a hard time giving up kitty's hints feature.
For those who aren't familiar with kitty's hints feature, the corresponding documentation is at https://sw.kovidgoyal.net/kitty/kittens/hints/ (which also links to its source code). From the intro:
Those are just a couple examples, but through its flexible options you can go further. I don't leverage all the options, but I do use that second example practically on a daily basis, along with the similar
kitty_mod+p>h
shortcut to select a hash, which is very useful when working with git commands. I also usekitty_mod+p>w
to select words, though not quite as often. In addition to the shortcuts for inserting the selection into the terminal at my current cursor position, I also have mappings to copy each of these types of text to the clipboard (so I can paste them in e.g. a GitHub comment, Slack message, etc.).FWIW, here are the relevant quotes from the comments in #189:
@ferdinandyb:
@sluongng:
The text was updated successfully, but these errors were encountered: