|
|
@ -35,10 +35,10 @@ use std::collections::HashMap;
|
|
|
|
// f = find_char()
|
|
|
|
// f = find_char()
|
|
|
|
// g = goto (gg, G, gc, gd, etc)
|
|
|
|
// g = goto (gg, G, gc, gd, etc)
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// h = move_char_left(n)
|
|
|
|
// h = move_char_left(n) || arrow-left = move_char_left(n)
|
|
|
|
// j = move_line_down(n)
|
|
|
|
// j = move_line_down(n) || arrow-down = move_line_down(n)
|
|
|
|
// k = move_line_up(n)
|
|
|
|
// k = move_line_up(n) || arrow_up = move_line_up(n)
|
|
|
|
// l = move_char_right(n)
|
|
|
|
// l = move_char_right(n) || arrow-right = move_char_right(n)
|
|
|
|
// : = command line
|
|
|
|
// : = command line
|
|
|
|
// ; = collapse selection to cursor
|
|
|
|
// ; = collapse selection to cursor
|
|
|
|
// " = use register
|
|
|
|
// " = use register
|
|
|
@ -128,6 +128,24 @@ pub fn default() -> Keymaps {
|
|
|
|
key!('k') => commands::move_line_up,
|
|
|
|
key!('k') => commands::move_line_up,
|
|
|
|
key!('l') => commands::move_char_right,
|
|
|
|
key!('l') => commands::move_char_right,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KeyEvent {
|
|
|
|
|
|
|
|
code: KeyCode::Left,
|
|
|
|
|
|
|
|
modifiers: KeyModifiers::NONE
|
|
|
|
|
|
|
|
} => commands::move_char_left as Command,
|
|
|
|
|
|
|
|
KeyEvent {
|
|
|
|
|
|
|
|
code: KeyCode::Down,
|
|
|
|
|
|
|
|
modifiers: KeyModifiers::NONE
|
|
|
|
|
|
|
|
} => commands::move_line_down,
|
|
|
|
|
|
|
|
KeyEvent {
|
|
|
|
|
|
|
|
code: KeyCode::Up,
|
|
|
|
|
|
|
|
modifiers: KeyModifiers::NONE
|
|
|
|
|
|
|
|
} => commands::move_line_up,
|
|
|
|
|
|
|
|
KeyEvent {
|
|
|
|
|
|
|
|
code: KeyCode::Right,
|
|
|
|
|
|
|
|
modifiers: KeyModifiers::NONE
|
|
|
|
|
|
|
|
} => commands::move_char_right,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
key!('t') => commands::find_till_char,
|
|
|
|
key!('t') => commands::find_till_char,
|
|
|
|
key!('f') => commands::find_next_char,
|
|
|
|
key!('f') => commands::find_next_char,
|
|
|
|
key!('T') => commands::till_prev_char,
|
|
|
|
key!('T') => commands::till_prev_char,
|
|
|
@ -269,6 +287,23 @@ pub fn default() -> Keymaps {
|
|
|
|
key!('k') => commands::extend_line_up,
|
|
|
|
key!('k') => commands::extend_line_up,
|
|
|
|
key!('l') => commands::extend_char_right,
|
|
|
|
key!('l') => commands::extend_char_right,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KeyEvent {
|
|
|
|
|
|
|
|
code: KeyCode::Left,
|
|
|
|
|
|
|
|
modifiers: KeyModifiers::NONE
|
|
|
|
|
|
|
|
} => commands::move_char_left as Command,
|
|
|
|
|
|
|
|
KeyEvent {
|
|
|
|
|
|
|
|
code: KeyCode::Down,
|
|
|
|
|
|
|
|
modifiers: KeyModifiers::NONE
|
|
|
|
|
|
|
|
} => commands::move_line_down,
|
|
|
|
|
|
|
|
KeyEvent {
|
|
|
|
|
|
|
|
code: KeyCode::Up,
|
|
|
|
|
|
|
|
modifiers: KeyModifiers::NONE
|
|
|
|
|
|
|
|
} => commands::move_line_up,
|
|
|
|
|
|
|
|
KeyEvent {
|
|
|
|
|
|
|
|
code: KeyCode::Right,
|
|
|
|
|
|
|
|
modifiers: KeyModifiers::NONE
|
|
|
|
|
|
|
|
} => commands::move_char_right,
|
|
|
|
|
|
|
|
|
|
|
|
key!('w') => commands::extend_next_word_start,
|
|
|
|
key!('w') => commands::extend_next_word_start,
|
|
|
|
key!('b') => commands::extend_prev_word_start,
|
|
|
|
key!('b') => commands::extend_prev_word_start,
|
|
|
|
key!('e') => commands::extend_next_word_end,
|
|
|
|
key!('e') => commands::extend_next_word_end,
|
|
|
|