diff options
author | Blaž Hrastnik | 2021-01-22 08:13:14 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-01-22 08:13:14 +0000 |
commit | 2bea5db7bdb3ad3fa029df830d824cd5c26a153f (patch) | |
tree | e45016157d4c3db7a56c5935f3e33843bc0daf87 /helix-term/src/keymap.rs | |
parent | a702af0aeb4562cbcdf8e2bc4008b8ce95da9a56 (diff) |
commands: Implement select_on_matches.
Diffstat (limited to 'helix-term/src/keymap.rs')
-rw-r--r-- | helix-term/src/keymap.rs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs index 440a3efb..a27abf09 100644 --- a/helix-term/src/keymap.rs +++ b/helix-term/src/keymap.rs @@ -121,14 +121,14 @@ macro_rules! ctrl { }; } -// macro_rules! alt { -// ($ch:expr) => { -// Key { -// code: KeyCode::Char($ch), -// modifiers: Modifiers::ALT, -// } -// }; -// } +macro_rules! alt { + ($ch:expr) => { + Key { + code: KeyCode::Char($ch), + modifiers: Modifiers::ALT, + } + }; +} pub fn default() -> Keymaps { hashmap!( @@ -159,7 +159,8 @@ pub fn default() -> Keymaps { vec![key!('o')] => commands::open_below, vec![key!('d')] => commands::delete_selection, vec![key!('c')] => commands::change_selection, - vec![key!('s')] => commands::split_selection_on_newline, + vec![key!('s')] => commands::select_regex, + vec![alt!('s')] => commands::split_selection_on_newline, vec![shift!('S')] => commands::split_selection, vec![key!(';')] => commands::collapse_selection, // TODO should be alt(;) |