diff --git a/src/actions.rs b/src/actions.rs index 7150714..a03b47f 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -32,6 +32,12 @@ pub fn load_actions() -> HashMap { ("move_line_down", move_line_down), ("move_line_up", move_line_up), ("move_char_right", move_char_right), + ("move_next_word_start", move_next_word_start), + ("move_prev_word_start", move_prev_word_start), + ("move_next_word_end", move_next_word_end), + ("move_next_long_word_start", move_next_long_word_start), + ("move_prev_long_word_start", move_prev_long_word_start), + ("move_next_long_word_end", move_next_long_word_end), ("page_up", page_up), ("page_down", page_down), ("goto_line_start", goto_line_start), @@ -78,6 +84,30 @@ pub fn move_line_up(state: &mut State) { state.move_cursor(Direction::Up); } +pub fn move_next_word_start(state: &mut State) { + state.set_error("move_next_word_start is unimplemented"); +} + +pub fn move_prev_word_start(state: &mut State) { + state.set_error("move_prev_word_start is unimplemented"); +} + +pub fn move_next_word_end(state: &mut State) { + state.set_error("move_next_word_end is unimplemented"); +} + +pub fn move_next_long_word_start(state: &mut State) { + state.set_error("move_next_long_word_start is unimplemented"); +} + +pub fn move_prev_long_word_start(state: &mut State) { + state.set_error("move_prev_long_word_start is unimplemented"); +} + +pub fn move_next_long_word_end(state: &mut State) { + state.set_error("move_next_long_word_end is unimplemented"); +} + pub fn page_up(state: &mut State) { state.set_error("page_up is unimplemented"); } diff --git a/src/keybinds.rs b/src/keybinds.rs index c9f993b..69af716 100644 --- a/src/keybinds.rs +++ b/src/keybinds.rs @@ -64,6 +64,12 @@ impl Default for Keybinds { (Char('j'), move_line_down), (Char('k'), move_line_up), (Char('l'), move_char_right), + (Char('w'), move_next_word_start), + (Char('b'), move_prev_word_start), + (Char('e'), move_next_word_end), + (Char('W'), move_next_long_word_start), + (Char('B'), move_prev_long_word_start), + (Char('E'), move_next_long_word_end), (Char('i'), insert_mode), (Char('a'), append_mode), (Char('I'), insert_at_line_start),