This commit is contained in:
sxyazi 2025-01-04 09:36:27 +08:00
parent 90ccc63244
commit 8ca43a53df
No known key found for this signature in database
3 changed files with 10 additions and 17 deletions

View file

@ -233,8 +233,8 @@ keymap = [
# Mode # Mode
{ on = "i", run = "insert", desc = "Enter insert mode" }, { on = "i", run = "insert", desc = "Enter insert mode" },
{ on = "a", run = "insert --append", desc = "Enter append mode" },
{ on = "I", run = [ "move first-char", "insert" ], desc = "Move to the BOL, and enter insert mode" }, { on = "I", run = [ "move first-char", "insert" ], desc = "Move to the BOL, and enter insert mode" },
{ on = "a", run = "insert --append", desc = "Enter append mode" },
{ on = "A", run = [ "move eol", "insert --append" ], desc = "Move to the EOL, and enter append mode" }, { on = "A", run = [ "move eol", "insert --append" ], desc = "Move to the EOL, and enter append mode" },
{ on = "v", run = "visual", desc = "Enter visual mode" }, { on = "v", run = "visual", desc = "Enter visual mode" },
{ on = "V", run = [ "move bol", "visual", "move eol" ], desc = "Enter visual mode and select all" }, { on = "V", run = [ "move bol", "visual", "move eol" ], desc = "Enter visual mode and select all" },
@ -250,10 +250,10 @@ keymap = [
# Word-wise movement # Word-wise movement
{ on = "b", run = "backward", desc = "Move back to the start of the current or previous word" }, { on = "b", run = "backward", 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 = "e", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
{ on = "B", run = "backward --big", desc = "Move back to the start of the current or previous WORD" }, { on = "B", run = "backward --big", 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 --big", desc = "Move forward to the start of the next WORD" }, { on = "W", run = "forward --big", 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 --big --end-of-word", desc = "Move forward to the end of the current or next WORD" }, { on = "E", run = "forward --big --end-of-word", desc = "Move forward to the end of the current or next WORD" },
{ on = "<A-b>", run = "backward", desc = "Move back to the start of the current or previous word" }, { on = "<A-b>", run = "backward", desc = "Move back to the start of the current or previous word" },
{ on = "<A-f>", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, { on = "<A-f>", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },

View file

@ -1,4 +1 @@
yazi_macro::mod_flat!( yazi_macro::mod_flat!(backspace backward close complete delete escape forward insert kill move_ paste redo replace show type_ undo visual yank);
backspace backward close complete delete escape forward insert kill move_ paste redo
replace show type_ undo visual yank
);

View file

@ -10,11 +10,7 @@ impl Input {
if snap.mode == InputMode::Normal { if snap.mode == InputMode::Normal {
snap.op = InputOp::None; snap.op = InputOp::None;
snap.mode = InputMode::Replace; snap.mode = InputMode::Replace;
} else {
return;
}
render!(); render!();
} }
} }
}