feat(command): update keybindings for navigation and editing
Update keybindings to support new navigation commands and improve user experience. - Bind `Home` to `jump-first-col` and `End` to `jump-last-col` . - Bind `PageUp` and `PageDown` to `page-scroll` . - Update `o` keybinding from `add-record-row` to `open-record-row` . - Bind `Tab` to `commit-and-advance-right` in editing mode. Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q5_K_XL)
This commit is contained in:
@ -266,10 +266,14 @@ impl KeymapSet {
|
|||||||
normal.bind(KeyCode::Char('G'), none, "jump-last-row");
|
normal.bind(KeyCode::Char('G'), none, "jump-last-row");
|
||||||
normal.bind(KeyCode::Char('0'), none, "jump-first-col");
|
normal.bind(KeyCode::Char('0'), none, "jump-first-col");
|
||||||
normal.bind(KeyCode::Char('$'), none, "jump-last-col");
|
normal.bind(KeyCode::Char('$'), none, "jump-last-col");
|
||||||
|
normal.bind(KeyCode::Home, none, "jump-first-col");
|
||||||
|
normal.bind(KeyCode::End, none, "jump-last-col");
|
||||||
|
|
||||||
// Scroll
|
// Scroll
|
||||||
normal.bind_args(KeyCode::Char('d'), ctrl, "scroll-rows", vec!["5".into()]);
|
normal.bind_args(KeyCode::Char('d'), ctrl, "scroll-rows", vec!["5".into()]);
|
||||||
normal.bind_args(KeyCode::Char('u'), ctrl, "scroll-rows", vec!["-5".into()]);
|
normal.bind_args(KeyCode::Char('u'), ctrl, "scroll-rows", vec!["-5".into()]);
|
||||||
|
normal.bind_args(KeyCode::PageDown, none, "page-scroll", vec!["1".into()]);
|
||||||
|
normal.bind_args(KeyCode::PageUp, none, "page-scroll", vec!["-1".into()]);
|
||||||
|
|
||||||
// Cell operations
|
// Cell operations
|
||||||
normal.bind(KeyCode::Char('x'), none, "clear-cell");
|
normal.bind(KeyCode::Char('x'), none, "clear-cell");
|
||||||
@ -357,7 +361,7 @@ impl KeymapSet {
|
|||||||
// Drill into aggregated cell / view history / add row
|
// Drill into aggregated cell / view history / add row
|
||||||
normal.bind(KeyCode::Char('>'), none, "drill-into-cell");
|
normal.bind(KeyCode::Char('>'), none, "drill-into-cell");
|
||||||
normal.bind(KeyCode::Char('<'), none, "view-back");
|
normal.bind(KeyCode::Char('<'), none, "view-back");
|
||||||
normal.bind(KeyCode::Char('o'), none, "add-record-row");
|
normal.bind(KeyCode::Char('o'), none, "open-record-row");
|
||||||
|
|
||||||
// Records mode toggle and prune toggle
|
// Records mode toggle and prune toggle
|
||||||
normal.bind(KeyCode::Char('R'), none, "toggle-records-mode");
|
normal.bind(KeyCode::Char('R'), none, "toggle-records-mode");
|
||||||
@ -560,6 +564,7 @@ impl KeymapSet {
|
|||||||
let mut ed = Keymap::new();
|
let mut ed = Keymap::new();
|
||||||
ed.bind_args(KeyCode::Esc, none, "enter-mode", vec!["normal".into()]);
|
ed.bind_args(KeyCode::Esc, none, "enter-mode", vec!["normal".into()]);
|
||||||
ed.bind(KeyCode::Enter, none, "commit-cell-edit");
|
ed.bind(KeyCode::Enter, none, "commit-cell-edit");
|
||||||
|
ed.bind(KeyCode::Tab, none, "commit-and-advance-right");
|
||||||
ed.bind_args(KeyCode::Backspace, none, "pop-char", vec!["edit".into()]);
|
ed.bind_args(KeyCode::Backspace, none, "pop-char", vec!["edit".into()]);
|
||||||
ed.bind_any_char("append-char", vec!["edit".into()]);
|
ed.bind_any_char("append-char", vec!["edit".into()]);
|
||||||
set.insert(ModeKey::Editing, Arc::new(ed));
|
set.insert(ModeKey::Editing, Arc::new(ed));
|
||||||
|
|||||||
Reference in New Issue
Block a user