Rename paragraph motion commands from move to goto (#2226)
* fix command name for next/prev paragraph motion * rename move_next/prev_paragraph to goto_next/prev_paragraph
This commit is contained in:
parent
5ca8dfe57c
commit
3f2bd7770e
2 changed files with 9 additions and 9 deletions
|
@ -209,8 +209,6 @@ impl MappableCommand {
|
||||||
move_next_long_word_start, "Move to beginning of next long word",
|
move_next_long_word_start, "Move to beginning of next long word",
|
||||||
move_prev_long_word_start, "Move to beginning of previous long word",
|
move_prev_long_word_start, "Move to beginning of previous long word",
|
||||||
move_next_long_word_end, "Move to end of next long word",
|
move_next_long_word_end, "Move to end of next long word",
|
||||||
move_prev_paragraph, "Move to previous paragraph",
|
|
||||||
move_next_paragraph, "Move to next paragraph",
|
|
||||||
extend_next_word_start, "Extend to beginning of next word",
|
extend_next_word_start, "Extend to beginning of next word",
|
||||||
extend_prev_word_start, "Extend to beginning of previous word",
|
extend_prev_word_start, "Extend to beginning of previous word",
|
||||||
extend_next_long_word_start, "Extend to beginning of next long word",
|
extend_next_long_word_start, "Extend to beginning of next long word",
|
||||||
|
@ -390,6 +388,8 @@ impl MappableCommand {
|
||||||
goto_prev_parameter, "Goto previous parameter",
|
goto_prev_parameter, "Goto previous parameter",
|
||||||
goto_next_comment, "Goto next comment",
|
goto_next_comment, "Goto next comment",
|
||||||
goto_prev_comment, "Goto previous comment",
|
goto_prev_comment, "Goto previous comment",
|
||||||
|
goto_next_paragraph, "Goto next paragraph",
|
||||||
|
goto_prev_paragraph, "Goto previous paragraph",
|
||||||
dap_launch, "Launch debug target",
|
dap_launch, "Launch debug target",
|
||||||
dap_toggle_breakpoint, "Toggle breakpoint",
|
dap_toggle_breakpoint, "Toggle breakpoint",
|
||||||
dap_continue, "Continue program execution",
|
dap_continue, "Continue program execution",
|
||||||
|
@ -922,7 +922,7 @@ fn move_next_long_word_end(cx: &mut Context) {
|
||||||
move_word_impl(cx, movement::move_next_long_word_end)
|
move_word_impl(cx, movement::move_next_long_word_end)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn move_para_impl<F>(cx: &mut Context, move_fn: F)
|
fn goto_para_impl<F>(cx: &mut Context, move_fn: F)
|
||||||
where
|
where
|
||||||
F: Fn(RopeSlice, Range, usize, Movement) -> Range + 'static,
|
F: Fn(RopeSlice, Range, usize, Movement) -> Range + 'static,
|
||||||
{
|
{
|
||||||
|
@ -946,12 +946,12 @@ where
|
||||||
cx.editor.last_motion = Some(Motion(Box::new(motion)));
|
cx.editor.last_motion = Some(Motion(Box::new(motion)));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn move_prev_paragraph(cx: &mut Context) {
|
fn goto_prev_paragraph(cx: &mut Context) {
|
||||||
move_para_impl(cx, movement::move_prev_paragraph)
|
goto_para_impl(cx, movement::move_prev_paragraph)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn move_next_paragraph(cx: &mut Context) {
|
fn goto_next_paragraph(cx: &mut Context) {
|
||||||
move_para_impl(cx, movement::move_next_paragraph)
|
goto_para_impl(cx, movement::move_next_paragraph)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn goto_file_start(cx: &mut Context) {
|
fn goto_file_start(cx: &mut Context) {
|
||||||
|
|
|
@ -104,7 +104,7 @@ pub fn default() -> HashMap<Mode, Keymap> {
|
||||||
"c" => goto_prev_class,
|
"c" => goto_prev_class,
|
||||||
"a" => goto_prev_parameter,
|
"a" => goto_prev_parameter,
|
||||||
"o" => goto_prev_comment,
|
"o" => goto_prev_comment,
|
||||||
"p" => move_prev_paragraph,
|
"p" => goto_prev_paragraph,
|
||||||
"space" => add_newline_above,
|
"space" => add_newline_above,
|
||||||
},
|
},
|
||||||
"]" => { "Right bracket"
|
"]" => { "Right bracket"
|
||||||
|
@ -114,7 +114,7 @@ pub fn default() -> HashMap<Mode, Keymap> {
|
||||||
"c" => goto_next_class,
|
"c" => goto_next_class,
|
||||||
"a" => goto_next_parameter,
|
"a" => goto_next_parameter,
|
||||||
"o" => goto_next_comment,
|
"o" => goto_next_comment,
|
||||||
"p" => move_next_paragraph,
|
"p" => goto_next_paragraph,
|
||||||
"space" => add_newline_below,
|
"space" => add_newline_below,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue