diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-04-13 03:24:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 03:24:42 +0000 |
commit | 96fc9ecc9a62c8a766da745d05fbe60e6c2e1efe (patch) | |
tree | 16e237d750d6c650713b58df98453dc4df16d33a /alacritty.yml | |
parent | 40bcdb11335cc49d4d42694b953be746cb383cb9 (diff) | |
download | alacritty-96fc9ecc9a62c8a766da745d05fbe60e6c2e1efe.tar.gz alacritty-96fc9ecc9a62c8a766da745d05fbe60e6c2e1efe.zip |
Add vi/mouse hint highlighting support
This patch removes the old url highlighting code and replaces it with a
new implementation making use of hints as sources for finding matches in
the terminal.
Diffstat (limited to 'alacritty.yml')
-rw-r--r-- | alacritty.yml | 58 |
1 files changed, 22 insertions, 36 deletions
diff --git a/alacritty.yml b/alacritty.yml index 6cca5b76..840c4ed9 100644 --- a/alacritty.yml +++ b/alacritty.yml @@ -445,29 +445,6 @@ # If this is `true`, the cursor is temporarily hidden when typing. #hide_when_typing: false - #url: - # URL launcher - # - # This program is executed when clicking on a text which is recognized as a - # URL. The URL is always added to the command as the last parameter. - # - # When set to `launcher: None`, URL launching will be disabled completely. - # - # Default: - # - (macOS) open - # - (Linux/BSD) xdg-open - # - (Windows) cmd /c start "" - #launcher: - # program: xdg-open - # args: [] - - # URL modifiers - # - # These are the modifiers that need to be held down for opening URLs when - # clicking on them. The available modifiers are documented in the key - # binding section. - #modifiers: None - # Regex hints # # Terminal hints can be used to find text in the visible part of the terminal @@ -478,10 +455,18 @@ # List with all available hints # - # Each hint takes a `regex`, `binding` and either a `command` or an `action`. + # Each hint must have a `regex` and either an `action` or a `command` field. + # The fields `mouse`, `binding` and `post_processing` are optional. + # + # The fields `command`, `binding.key`, `binding.mods` and `mouse.mods` accept + # the same values as they do in the `key_bindings` section. + # + # The `mouse.enabled` field controls if the hint should be underlined while + # the mouse with all `mouse.mods` keys held or the vi mode cursor is above it. # - # The fields `command`, `binding.key` and `binding.mods` accept the same - # values as they do in the `key_bindings` section. + # If the `post_processing` field is set to `true`, heuristics will be used to + # shorten the match if there are characters likely not to be part of the hint + # (e.g. a trailing `.`). This is most useful for URIs. # # Values for `action`: # - Copy @@ -490,16 +475,17 @@ # Paste the hint's text to the terminal or search. # - Select # Select the hint's text. - # - # Example - # - # enabled: - # - regex: "alacritty/alacritty#\\d*" - # command: firefox - # binding: - # key: G - # mods: Control|Shift - #enabled: [] + #enabled: + # - regex: "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ + # [^\u0000-\u001F\u007F-\u009F<>\" {-}\\^⟨⟩`]+" + # command: xdg-open + # post_processing: true + # mouse: + # enabled: true + # mods: None + # binding: + # key: U + # mods: Control|Shift # Mouse bindings # |