From 7468fa28fd41ed24c5ca8067274ad7fc86092971 Mon Sep 17 00:00:00 2001 From: asvln Date: Tue, 8 Nov 2022 10:42:07 -0500 Subject: [PATCH] add `extend_prev_word_end` command --- helix-term/src/commands.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 71356d08f865..9ea04c438833 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -210,17 +210,18 @@ impl MappableCommand { copy_selection_on_prev_line, "Copy selection on previous line", move_next_word_start, "Move to start of next word", move_prev_word_start, "Move to start of previous word", - move_prev_word_end, "Move to end of previous word", move_next_word_end, "Move to end of next word", + move_prev_word_end, "Move to end of previous word", move_next_long_word_start, "Move to start of next long word", move_prev_long_word_start, "Move to start of previous long word", move_next_long_word_end, "Move to end of next long word", extend_next_word_start, "Extend to start of next word", extend_prev_word_start, "Extend to start of previous word", + extend_next_word_end, "Extend to end of next word", + extend_prev_word_end, "Extend to end of previous word", extend_next_long_word_start, "Extend to start of next long word", extend_prev_long_word_start, "Extend to start of previous long word", extend_next_long_word_end, "Extend to end of next long word", - extend_next_word_end, "Extend to end of next word", find_till_char, "Move till next occurrence of char", find_next_char, "Move to next occurrence of char", extend_till_char, "Extend till next occurrence of char", @@ -310,8 +311,7 @@ impl MappableCommand { goto_line_end, "Goto line end", goto_next_buffer, "Goto next buffer", goto_previous_buffer, "Goto previous buffer", - // TODO: different description ? - goto_line_end_newline, "Goto line end", + goto_line_end_newline, "Goto line end (newline)", goto_first_nonwhitespace, "Goto first non-blank in line", trim_selections, "Trim whitespace from selections", extend_to_line_start, "Extend to line start", @@ -1093,6 +1093,10 @@ fn extend_next_word_end(cx: &mut Context) { extend_word_impl(cx, movement::move_next_word_end) } +fn extend_prev_word_end(cx: &mut Context) { + extend_word_impl(cx, movement::move_prev_word_end) +} + fn extend_next_long_word_start(cx: &mut Context) { extend_word_impl(cx, movement::move_next_long_word_start) }