Skip to content

Commit 3dd1fe6

Browse files
committed
Make A-hjkl tree-sitter nav A-poin
A-hl currently is not very consistent with hl when next object is selected, since it may go up/down or left/right and this behavior is confusing such that some people think it should swap the keys with A-jk, so it is better to use A-pn since that only specifies two direction. A-jk have the same issue as in it usually moves right and is not consistent with the behavior of jk so people may think A-hl is better, maybe A-io is better here since A-hl will be swapped to A-pn, A-io can convey the meaning of in and out, similar to some window manager keys?
1 parent b0bceb5 commit 3dd1fe6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

book/src/keymap.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@
111111
| `K` | Keep selections matching the regex | `keep_selections` |
112112
| `Alt-K` | Remove selections matching the regex | `remove_selections` |
113113
| `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` |
114-
| `Alt-k`, `Alt-up` | Expand selection to parent syntax node (**TS**) | `expand_selection` |
115-
| `Alt-j`, `Alt-down` | Shrink syntax tree object selection (**TS**) | `shrink_selection` |
116-
| `Alt-h`, `Alt-left` | Select previous sibling node in syntax tree (**TS**) | `select_prev_sibling` |
117-
| `Alt-l`, `Alt-right` | Select next sibling node in syntax tree (**TS**) | `select_next_sibling` |
114+
| `Alt-o`, `Alt-up` | Expand selection to parent syntax node (**TS**) | `expand_selection` |
115+
| `Alt-i`, `Alt-down` | Shrink syntax tree object selection (**TS**) | `shrink_selection` |
116+
| `Alt-p`, `Alt-left` | Select previous sibling node in syntax tree (**TS**) | `select_prev_sibling` |
117+
| `Alt-n`, `Alt-right` | Select next sibling node in syntax tree (**TS**) | `select_next_sibling` |
118118

119119
### Search
120120

helix-term/src/keymap/default.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ pub fn default() -> HashMap<Mode, Keymap> {
7979
"S" => split_selection,
8080
";" => collapse_selection,
8181
"A-;" => flip_selections,
82-
"A-k" | "A-up" => expand_selection,
83-
"A-j" | "A-down" => shrink_selection,
84-
"A-h" | "A-left" => select_prev_sibling,
85-
"A-l" | "A-right" => select_next_sibling,
82+
"A-o" | "A-up" => expand_selection,
83+
"A-i" | "A-down" => shrink_selection,
84+
"A-p" | "A-left" => select_prev_sibling,
85+
"A-n" | "A-right" => select_next_sibling,
8686

8787
"%" => select_all,
8888
"x" => extend_line,

0 commit comments

Comments
 (0)