Appearance
Hint Mode
Hint Mode lets you act on text in the visible terminal viewport without using the mouse. Otty labels every matching target with a one-, two-, or three-letter code; type the complete code to run the configured action.
Activating
Hint Mode does not have a default shortcut. On macOS, start the original open-link action from Shell → Open Link (Hint Mode), find it in the Command Palette, or assign one of these actions under Settings → Key Bindings:
| Action | Targets | Result |
|---|---|---|
| Hint: Open | Links and file paths | Open the selected target |
| Hint: Copy | Links and file paths | Copy its URL or resolved path |
| Hint: Paste | Links and file paths | Insert its visible text at the terminal cursor |
| Hint: Reveal | File paths | Reveal the selected file in Finder |
For example, this makes ⌘⇧Y copy a hinted URL or path:
ini
keybind = cmd+shift+y=hint_copyThe legacy toggle_hint_mode action remains available:
ini
keybind = cmd+shift+j=toggle_hint_modeWith Hint: Open or toggle_hint_mode, hold Shift while typing the final label character to copy instead of open. Esc cancels Hint Mode, and Backspace removes the last label character.
Matchers and actions
Custom Hint Mode bindings use this action format:
text
hint:<matcher>:<action>The built-in matchers are:
| Matcher | Matches |
|---|---|
link | URLs, OSC 8 hyperlinks, and file paths |
url | URLs and OSC 8 hyperlinks |
path | File paths |
word | Word-like tokens of at least three characters |
ip | IPv4 and IPv6 addresses |
hash | 7–64 character hexadecimal hashes |
The actions are open, copy, paste, and reveal. For example, this is the equivalent of hinting words and inserting the selected word at the cursor:
ini
keybind = cmd+opt+w=hint:word:pasteTo copy a word instead:
ini
keybind = cmd+opt+c=hint:word:copypaste inserts the exact text displayed in the terminal and uses Otty's normal paste-protection checks. copy uses the resolved URL or absolute path for link targets and the exact displayed text for text matchers.
Custom regular expressions
Define a named regular expression with a repeated hint-pattern setting, then use that name as the matcher:
ini
hint-pattern = ticket=OTTY-[0-9]+
keybind = cmd+opt+t=hint:ticket:copyIf the expression contains a numbered capture group, Otty hints the first group; otherwise it hints the whole match:
ini
hint-pattern = pr=PR-([0-9]+)
keybind = cmd+opt+p=hint:pr:pastePattern names may contain ASCII letters, digits, _, and -; the built-in names link, url, path, word, ip, and hash are reserved. Invalid names and regular expressions are rejected when the configuration is loaded.
URL templates and commands
An open action may include a URL template. Otty replaces {0} with the exact matched text:
ini
keybind = cmd+opt+o=hint:ticket:open:https://github.com/search?q={0}A run action launches a command without invoking a shell:
ini
keybind = cmd+opt+r=hint:ticket:run:open https://github.com/search?q={0}The command template is split into arguments before {0} is substituted, so matched terminal text cannot inject extra arguments or shell operators. If the template omits {0}, Otty appends the matched text as its final argument.
Scope
Hints are computed from the visible viewport when the mode starts. Labels stay attached to their targets while you scroll, but newly visible text is not added until you start Hint Mode again.
Differences from ⌘click
⌘click acts on the single target under the pointer. Hint Mode labels every matching target in the viewport and can open, copy, paste, reveal, or pass it to a command entirely from the keyboard.
See also
- Files and Links — file-path detection and link opening
- Custom Keybindings — assigning shortcuts
- Vi Mode — keyboard selection