diff --git a/README.md b/README.md index d85d81d..4c1cad0 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ register holds all files which got yanked and the last nine trashes. | "p\ | paste register named \ from junk yard to current path | | yp | copy current selected path to system clipboard | | yy | yank file to junk yard | +| C-n, C-p | navigate to (n)ext or (p) qfix entry | ### navigation and normal mode diff --git a/yeet-keymap/src/map.rs b/yeet-keymap/src/map.rs index ba597fd..9093f98 100644 --- a/yeet-keymap/src/map.rs +++ b/yeet-keymap/src/map.rs @@ -98,6 +98,24 @@ impl Default for KeyMap { &mut mappings, vec![Mode::Navigation], vec![ + ( + vec![Key::new(KeyCode::from_char('n'), vec![KeyModifier::Ctrl])], + Binding { + kind: BindingKind::Message(KeymapMessage::ExecuteCommandString( + "cn".to_owned(), + )), + ..Default::default() + }, + ), + ( + vec![Key::new(KeyCode::from_char('p'), vec![KeyModifier::Ctrl])], + Binding { + kind: BindingKind::Message(KeymapMessage::ExecuteCommandString( + "cN".to_owned(), + )), + ..Default::default() + }, + ), ( vec![ Key::new(KeyCode::from_char('"'), vec![]), @@ -819,6 +837,7 @@ fn add_mapping( } fn get_home_path() -> PathBuf { + // TODO: custom keymap message to remove dirs dependency in keymap dirs::home_dir() .expect("Failed to get home directory") .to_path_buf()