aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/keymap
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-10-08 22:14:49 +0000
committerMichael Davis2023-08-01 14:41:42 +0000
commit15e07d4db893aec7b9e117c1f88400a68ba98ae2 (patch)
treef3d78f1904c596af44e79d0f850c33c3f518f2fb /helix-term/src/keymap
parent93acb538121cab36712f40f26fa287df93817de5 (diff)
feat: smart_tab
Implement `smart_tab`, which optionally makes the tab key run the `move_parent_node_start` command when the cursor has non- whitespace to its left.
Diffstat (limited to 'helix-term/src/keymap')
-rw-r--r--helix-term/src/keymap/default.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/keymap/default.rs b/helix-term/src/keymap/default.rs
index 419e376f..763ed4ae 100644
--- a/helix-term/src/keymap/default.rs
+++ b/helix-term/src/keymap/default.rs
@@ -373,7 +373,8 @@ pub fn default() -> HashMap<Mode, KeyTrie> {
"C-h" | "backspace" | "S-backspace" => delete_char_backward,
"C-d" | "del" => delete_char_forward,
"C-j" | "ret" => insert_newline,
- "tab" => insert_tab,
+ "tab" => smart_tab,
+ "S-tab" => insert_tab,
"up" => move_visual_line_up,
"down" => move_visual_line_down,