From c0615e5f45b30856a4fd1a8850f8ede93d97c9fd Mon Sep 17 00:00:00 2001 From: Axlefublr <101342105+Axlefublr@users.noreply.github.com> Date: Mon, 9 Jun 2025 08:22:13 +0800 Subject: [PATCH] feat: port several widespread GUI keys to the input component (#2849) Co-authored-by: sxyazi --- yazi-config/preset/keymap-default.toml | 28 +++++++++++++++----------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/yazi-config/preset/keymap-default.toml b/yazi-config/preset/keymap-default.toml index 397b2ec1..c02666de 100644 --- a/yazi-config/preset/keymap-default.toml +++ b/yazi-config/preset/keymap-default.toml @@ -254,14 +254,16 @@ keymap = [ { on = "", run = "move 1", desc = "Move forward a character" }, # Word-wise movement - { on = "b", run = "backward", desc = "Move back to the start of the current or previous word" }, - { on = "B", run = "backward --far", desc = "Move back to the start of the current or previous WORD" }, - { on = "w", run = "forward", desc = "Move forward to the start of the next word" }, - { on = "W", run = "forward --far", desc = "Move forward to the start of the next WORD" }, - { on = "e", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, - { on = "E", run = "forward --far --end-of-word", desc = "Move forward to the end of the current or next WORD" }, - { on = "", run = "backward", desc = "Move back to the start of the current or previous word" }, - { on = "", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, + { on = "b", run = "backward", desc = "Move back to the start of the current or previous word" }, + { on = "B", run = "backward --far", desc = "Move back to the start of the current or previous WORD" }, + { on = "w", run = "forward", desc = "Move forward to the start of the next word" }, + { on = "W", run = "forward --far", desc = "Move forward to the start of the next WORD" }, + { on = "e", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, + { on = "E", run = "forward --far --end-of-word", desc = "Move forward to the end of the current or next WORD" }, + { on = "", run = "backward", desc = "Move back to the start of the current or previous word" }, + { on = "", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, + { on = "", run = "backward", desc = "Move back to the start of the current or previous word" }, + { on = "", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, # Line-wise movement { on = "0", run = "move bol", desc = "Move to the BOL" }, @@ -280,10 +282,12 @@ keymap = [ { on = "", run = "backspace --under", desc = "Delete the character under the cursor" }, # Kill - { on = "", run = "kill bol", desc = "Kill backwards to the BOL" }, - { on = "", run = "kill eol", desc = "Kill forwards to the EOL" }, - { on = "", run = "kill backward", desc = "Kill backwards to the start of the current word" }, - { on = "", run = "kill forward", desc = "Kill forwards to the end of the current word" }, + { on = "", run = "kill bol", desc = "Kill backwards to the BOL" }, + { on = "", run = "kill eol", desc = "Kill forwards to the EOL" }, + { on = "", run = "kill backward", desc = "Kill backwards to the start of the current word" }, + { on = "", run = "kill forward", desc = "Kill forwards to the end of the current word" }, + { on = "", run = "kill backward", desc = "Kill backwards to the start of the current word" }, + { on = "", run = "kill forward", desc = "Kill forwards to the end of the current word" }, # Cut/Yank/Paste { on = "d", run = "delete --cut", desc = "Cut selected characters" },