on master help sign in
Make A-hjkl tree-sitter nav A-pion (#2205)

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-oi is better here since A-hl will be swapped to A-pn, A-oi can convey the meaning of in and out, similar to some window manager keys?

commitab6a00e196832d3a2b942641f914a0c9727129e4 authorIvan Tham <pickfire@riseup.net> dateFri 29 Apr 2022, 14:49 (5 years ago) parente10cf08
2 files changed+8−8
book/src/keymap.md+4−4 helix-term/src/keymap/default.rs+4−4
book/src/keymap.md+4−4
@@ -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+4−4
@@ -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,