aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/keymap.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-10-09 07:58:43 +0000
committerBlaž Hrastnik2020-10-13 14:13:56 +0000
commit00e661f600b7465750a9bcce8e89eabd5b17b4af (patch)
tree59712ddb43fce8992fabbfeb079f17eac433fb33 /helix-view/src/keymap.rs
parent4a648555ed7a61de615baad551bab8f34a5bad74 (diff)
Indent draft, linewise paste
Diffstat (limited to 'helix-view/src/keymap.rs')
-rw-r--r--helix-view/src/keymap.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/helix-view/src/keymap.rs b/helix-view/src/keymap.rs
index 8c53b403..1d7505d2 100644
--- a/helix-view/src/keymap.rs
+++ b/helix-view/src/keymap.rs
@@ -117,6 +117,15 @@ macro_rules! ctrl {
};
}
+macro_rules! alt {
+ ($ch:expr) => {
+ Key {
+ code: KeyCode::Char($ch),
+ modifiers: Modifiers::ALT,
+ }
+ };
+}
+
pub fn default() -> Keymaps {
hashmap!(
state::Mode::Normal =>
@@ -145,11 +154,15 @@ pub fn default() -> Keymaps {
vec![key!('c')] => commands::change_selection,
vec![key!('s')] => commands::split_selection_on_newline,
vec![key!(';')] => commands::collapse_selection,
+ // TODO should be alt(;)
+ vec![key!('%')] => commands::flip_selections,
vec![key!('x')] => commands::select_line,
vec![key!('u')] => commands::undo,
vec![shift!('U')] => commands::redo,
vec![key!('y')] => commands::yank,
vec![key!('p')] => commands::paste,
+ vec![key!('>')] => commands::indent,
+ vec![key!('<')] => commands::unindent,
vec![Key {
code: KeyCode::Esc,
modifiers: Modifiers::NONE