diff options
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(;) |