|
|
@ -158,6 +158,9 @@ impl Command {
|
|
|
|
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_prev_long_word_start,
|
|
|
|
|
|
|
|
move_next_long_word_end,
|
|
|
|
move_file_start,
|
|
|
|
move_file_start,
|
|
|
|
move_file_end,
|
|
|
|
move_file_end,
|
|
|
|
extend_next_word_start,
|
|
|
|
extend_next_word_start,
|
|
|
@ -434,6 +437,42 @@ fn move_next_word_end(cx: &mut Context) {
|
|
|
|
doc.set_selection(view.id, selection);
|
|
|
|
doc.set_selection(view.id, selection);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn move_next_long_word_start(cx: &mut Context) {
|
|
|
|
|
|
|
|
let count = cx.count();
|
|
|
|
|
|
|
|
let (view, doc) = current!(cx.editor);
|
|
|
|
|
|
|
|
let text = doc.text().slice(..);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let selection = doc
|
|
|
|
|
|
|
|
.selection(view.id)
|
|
|
|
|
|
|
|
.transform(|range| movement::move_next_long_word_start(text, range, count));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doc.set_selection(view.id, selection);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn move_prev_long_word_start(cx: &mut Context) {
|
|
|
|
|
|
|
|
let count = cx.count();
|
|
|
|
|
|
|
|
let (view, doc) = current!(cx.editor);
|
|
|
|
|
|
|
|
let text = doc.text().slice(..);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let selection = doc
|
|
|
|
|
|
|
|
.selection(view.id)
|
|
|
|
|
|
|
|
.transform(|range| movement::move_prev_long_word_start(text, range, count));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doc.set_selection(view.id, selection);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn move_next_long_word_end(cx: &mut Context) {
|
|
|
|
|
|
|
|
let count = cx.count();
|
|
|
|
|
|
|
|
let (view, doc) = current!(cx.editor);
|
|
|
|
|
|
|
|
let text = doc.text().slice(..);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let selection = doc
|
|
|
|
|
|
|
|
.selection(view.id)
|
|
|
|
|
|
|
|
.transform(|range| movement::move_next_long_word_end(text, range, count));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doc.set_selection(view.id, selection);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn move_file_start(cx: &mut Context) {
|
|
|
|
fn move_file_start(cx: &mut Context) {
|
|
|
|
push_jump(cx.editor);
|
|
|
|
push_jump(cx.editor);
|
|
|
|
let (view, doc) = current!(cx.editor);
|
|
|
|
let (view, doc) = current!(cx.editor);
|
|
|
|