feat: [hx] r to replace with a character

If no selection, the character under the cursor is replaced, if
selection, each character is replaced by the typed character.
This commit is contained in:
Igor Támara 2025-10-29 00:51:18 -05:00 committed by CJ van den Berg
parent 411b26d4aa
commit 8246f2b0ba
4 changed files with 164 additions and 0 deletions

View file

@ -379,6 +379,7 @@
["N", "extend_search_next"],
["*", "extend_search_prev"],
["r", "replace"],
["P", "paste_clipboard_before"],
["R", ["replace_selections_with_clipboard"], ["enter_mode", "normal"]],
["p", "paste_after"],
@ -546,6 +547,17 @@
["8", "add_integer_argument_digit", 8],
["9", "add_integer_argument_digit", 9]
]
},
"mini/replace": {
"press": [
["ctrl+g", "mini_mode_cancel"],
["ctrl+c", "mini_mode_cancel"],
["ctrl+l", "scroll_view_center_cycle"],
["tab", "mini_mode_insert_bytes", "\t"],
["enter", "mini_mode_insert_bytes", "\n"],
["escape", "mini_mode_cancel"],
["backspace", "mini_mode_cancel"]
]
},
"home": {
"on_match_failure": "ignore",