|
|
@ -249,6 +249,10 @@ impl MappableCommand {
|
|
|
|
move_prev_long_word_start, "Move to start of previous 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",
|
|
|
|
move_next_long_word_end, "Move to end of next long word",
|
|
|
|
move_prev_long_word_end, "Move to end of previous long word",
|
|
|
|
move_prev_long_word_end, "Move to end of previous long word",
|
|
|
|
|
|
|
|
move_next_sub_word_start, "Move to start of next sub word",
|
|
|
|
|
|
|
|
move_prev_sub_word_start, "Move to start of previous sub word",
|
|
|
|
|
|
|
|
move_next_sub_word_end, "Move to end of next sub word",
|
|
|
|
|
|
|
|
move_prev_sub_word_end, "Move to end of previous sub word",
|
|
|
|
move_parent_node_end, "Move to end of the parent node",
|
|
|
|
move_parent_node_end, "Move to end of the parent node",
|
|
|
|
move_parent_node_start, "Move to beginning of the parent node",
|
|
|
|
move_parent_node_start, "Move to beginning of the parent node",
|
|
|
|
extend_next_word_start, "Extend to start of next word",
|
|
|
|
extend_next_word_start, "Extend to start of next word",
|
|
|
@ -259,6 +263,10 @@ impl MappableCommand {
|
|
|
|
extend_prev_long_word_start, "Extend to start of previous 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_long_word_end, "Extend to end of next long word",
|
|
|
|
extend_prev_long_word_end, "Extend to end of prev long word",
|
|
|
|
extend_prev_long_word_end, "Extend to end of prev long word",
|
|
|
|
|
|
|
|
extend_next_sub_word_start, "Extend to start of next sub word",
|
|
|
|
|
|
|
|
extend_prev_sub_word_start, "Extend to start of previous sub word",
|
|
|
|
|
|
|
|
extend_next_sub_word_end, "Extend to end of next sub word",
|
|
|
|
|
|
|
|
extend_prev_sub_word_end, "Extend to end of prev sub word",
|
|
|
|
extend_parent_node_end, "Extend to end of the parent node",
|
|
|
|
extend_parent_node_end, "Extend to end of the parent node",
|
|
|
|
extend_parent_node_start, "Extend to beginning of the parent node",
|
|
|
|
extend_parent_node_start, "Extend to beginning of the parent node",
|
|
|
|
find_till_char, "Move till next occurrence of char",
|
|
|
|
find_till_char, "Move till next occurrence of char",
|
|
|
@ -1094,6 +1102,22 @@ 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_next_sub_word_start(cx: &mut Context) {
|
|
|
|
|
|
|
|
move_word_impl(cx, movement::move_next_sub_word_start)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn move_prev_sub_word_start(cx: &mut Context) {
|
|
|
|
|
|
|
|
move_word_impl(cx, movement::move_prev_sub_word_start)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn move_prev_sub_word_end(cx: &mut Context) {
|
|
|
|
|
|
|
|
move_word_impl(cx, movement::move_prev_sub_word_end)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn move_next_sub_word_end(cx: &mut Context) {
|
|
|
|
|
|
|
|
move_word_impl(cx, movement::move_next_sub_word_end)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn goto_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,
|
|
|
@ -1307,6 +1331,22 @@ fn extend_next_long_word_end(cx: &mut Context) {
|
|
|
|
extend_word_impl(cx, movement::move_next_long_word_end)
|
|
|
|
extend_word_impl(cx, movement::move_next_long_word_end)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn extend_next_sub_word_start(cx: &mut Context) {
|
|
|
|
|
|
|
|
extend_word_impl(cx, movement::move_next_sub_word_start)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn extend_prev_sub_word_start(cx: &mut Context) {
|
|
|
|
|
|
|
|
extend_word_impl(cx, movement::move_prev_sub_word_start)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn extend_prev_sub_word_end(cx: &mut Context) {
|
|
|
|
|
|
|
|
extend_word_impl(cx, movement::move_prev_sub_word_end)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn extend_next_sub_word_end(cx: &mut Context) {
|
|
|
|
|
|
|
|
extend_word_impl(cx, movement::move_next_sub_word_end)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Separate branch to find_char designed only for `<ret>` char.
|
|
|
|
/// Separate branch to find_char designed only for `<ret>` char.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// This is necessary because the one document can have different line endings inside. And we
|
|
|
|
// This is necessary because the one document can have different line endings inside. And we
|
|
|
|