aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/keymap.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-09-28 16:00:35 +0000
committerBlaž Hrastnik2020-09-28 16:00:35 +0000
commit3020077da8efbf914a9cb0a2cbb50362d339a39a (patch)
treeaf8eaf9c016ac5116f6349a6b5ebb79e77f8efb5 /helix-view/src/keymap.rs
parentfbe313779e83728b7dca7925df722c7fb4228d98 (diff)
Extend selection commands.
Diffstat (limited to 'helix-view/src/keymap.rs')
-rw-r--r--helix-view/src/keymap.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/helix-view/src/keymap.rs b/helix-view/src/keymap.rs
index 5d9b6653..750f1a5f 100644
--- a/helix-view/src/keymap.rs
+++ b/helix-view/src/keymap.rs
@@ -7,7 +7,9 @@ use std::collections::HashMap;
// normal = {
// q = record_macro
// w = (next) word
+// W = next WORD
// e = end of word
+// E = end of WORD
// r =
// t = 'till char
// y = yank
@@ -55,6 +57,12 @@ use std::collections::HashMap;
// & = align cursor
// ? = extend to next given regex match (alt = to prev)
//
+// in kakoune these are alt-h alt-l / gh gl
+// select from curs to begin end / move curs to begin end
+// 0 = start of line
+// ^ = start of line (first non blank char)
+// $ = end of line
+//
// z = save selections
// Z = restore selections
// x = select line
@@ -111,6 +119,22 @@ pub fn default() -> Keymaps {
modifiers: Modifiers::NONE
}] => commands::move_char_right as Command,
vec![Key {
+ code: KeyCode::Char('H'),
+ modifiers: Modifiers::SHIFT
+ }] => commands::extend_char_left as Command,
+ vec![Key {
+ code: KeyCode::Char('J'),
+ modifiers: Modifiers::SHIFT
+ }] => commands::extend_line_down as Command,
+ vec![Key {
+ code: KeyCode::Char('K'),
+ modifiers: Modifiers::SHIFT
+ }] => commands::extend_line_up as Command,
+ vec![Key {
+ code: KeyCode::Char('L'),
+ modifiers: Modifiers::SHIFT
+ }] => commands::extend_char_right as Command,
+ vec![Key {
code: KeyCode::Char('w'),
modifiers: Modifiers::NONE
}] => commands::move_next_word_start as Command,
@@ -143,6 +167,14 @@ pub fn default() -> Keymaps {
modifiers: Modifiers::NONE
}] => commands::open_below as Command,
vec![Key {
+ code: KeyCode::Char('d'),
+ modifiers: Modifiers::NONE
+ }] => commands::delete_selection as Command,
+ vec![Key {
+ code: KeyCode::Char('c'),
+ modifiers: Modifiers::NONE
+ }] => commands::change_selection as Command,
+ vec![Key {
code: KeyCode::Esc,
modifiers: Modifiers::NONE
}] => commands::normal_mode as Command,