mirror of https://github.com/helix-editor/helix
Add arrow key mappings for tree-sitter parent/child/sibling nav (#1724)
* Add arrow key mappings for tree-sitter parent/child/sibling nav This helps my use case, where I use a non-qwerty layout with a programmable mechanical keyboard, and use a layer switching key (think fn) to send left down up right from the traditional hjkl positions. * Add new bindings to docspull/1775/head
parent
bde0307c87
commit
24352b2729
|
@ -119,10 +119,10 @@
|
||||||
| `K` | Keep selections matching the regex | `keep_selections` |
|
| `K` | Keep selections matching the regex | `keep_selections` |
|
||||||
| `Alt-K` | Remove selections matching the regex | `remove_selections` |
|
| `Alt-K` | Remove selections matching the regex | `remove_selections` |
|
||||||
| `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` |
|
| `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` |
|
||||||
| `Alt-k` | Expand selection to parent syntax node (**TS**) | `expand_selection` |
|
| `Alt-k`/`Alt-up` | Expand selection to parent syntax node (**TS**) | `expand_selection` |
|
||||||
| `Alt-j` | Shrink syntax tree object selection (**TS**) | `shrink_selection` |
|
| `Alt-j`/`Alt-down` | Shrink syntax tree object selection (**TS**) | `shrink_selection` |
|
||||||
| `Alt-h` | Select previous sibling node in syntax tree (**TS**) | `select_prev_sibling` |
|
| `Alt-h`/`Alt-left` | Select previous sibling node in syntax tree (**TS**) | `select_prev_sibling` |
|
||||||
| `Alt-l` | Select next sibling node in syntax tree (**TS**) | `select_next_sibling` |
|
| `Alt-l`/`Alt-right` | Select next sibling node in syntax tree (**TS**) | `select_next_sibling` |
|
||||||
|
|
||||||
### Search
|
### Search
|
||||||
|
|
||||||
|
|
|
@ -584,10 +584,10 @@ impl Default for Keymaps {
|
||||||
"S" => split_selection,
|
"S" => split_selection,
|
||||||
";" => collapse_selection,
|
";" => collapse_selection,
|
||||||
"A-;" => flip_selections,
|
"A-;" => flip_selections,
|
||||||
"A-k" => expand_selection,
|
"A-k" | "A-up" => expand_selection,
|
||||||
"A-j" => shrink_selection,
|
"A-j" | "A-down" => shrink_selection,
|
||||||
"A-h" => select_prev_sibling,
|
"A-h" | "A-left" => select_prev_sibling,
|
||||||
"A-l" => select_next_sibling,
|
"A-l" | "A-right" => select_next_sibling,
|
||||||
|
|
||||||
"%" => select_all,
|
"%" => select_all,
|
||||||
"x" => extend_line,
|
"x" => extend_line,
|
||||||
|
|
Loading…
Reference in New Issue