aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/keymap
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/keymap')
-rw-r--r--helix-term/src/keymap/default.rs18
1 files changed, 12 insertions, 6 deletions
diff --git a/helix-term/src/keymap/default.rs b/helix-term/src/keymap/default.rs
index d48e6935..01184f80 100644
--- a/helix-term/src/keymap/default.rs
+++ b/helix-term/src/keymap/default.rs
@@ -7,8 +7,8 @@ use helix_core::hashmap;
pub fn default() -> HashMap<Mode, Keymap> {
let normal = keymap!({ "Normal mode"
"h" | "left" => move_char_left,
- "j" | "down" => move_line_down,
- "k" | "up" => move_line_up,
+ "j" | "down" => move_visual_line_down,
+ "k" | "up" => move_visual_line_up,
"l" | "right" => move_char_right,
"t" => find_till_char,
@@ -55,6 +55,8 @@ pub fn default() -> HashMap<Mode, Keymap> {
"m" => goto_last_modified_file,
"n" => goto_next_buffer,
"p" => goto_previous_buffer,
+ "k" => move_line_up,
+ "j" => move_line_down,
"." => goto_last_modification,
},
":" => command_mode,
@@ -321,8 +323,8 @@ pub fn default() -> HashMap<Mode, Keymap> {
let mut select = normal.clone();
select.merge_nodes(keymap!({ "Select mode"
"h" | "left" => extend_char_left,
- "j" | "down" => extend_line_down,
- "k" | "up" => extend_line_up,
+ "j" | "down" => extend_visual_line_down,
+ "k" | "up" => extend_visual_line_up,
"l" | "right" => extend_char_right,
"w" => extend_next_word_start,
@@ -345,6 +347,10 @@ pub fn default() -> HashMap<Mode, Keymap> {
"esc" => exit_select_mode,
"v" => normal_mode,
+ "g" => { "Goto"
+ "k" => extend_line_up,
+ "j" => extend_line_down,
+ },
}));
let insert = keymap!({ "Insert mode"
"esc" => normal_mode,
@@ -362,8 +368,8 @@ pub fn default() -> HashMap<Mode, Keymap> {
"C-j" | "ret" => insert_newline,
"tab" => insert_tab,
- "up" => move_line_up,
- "down" => move_line_down,
+ "up" => move_visual_line_up,
+ "down" => move_visual_line_down,
"left" => move_char_left,
"right" => move_char_right,
"pageup" => page_up,