mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
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 docs
This commit is contained in:
parent
bde0307c87
commit
24352b2729
@ -119,10 +119,10 @@ ### Selection manipulation
|
||||
| `K` | Keep selections matching the regex | `keep_selections` |
|
||||
| `Alt-K` | Remove selections matching the regex | `remove_selections` |
|
||||
| `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` |
|
||||
| `Alt-k` | Expand selection to parent syntax node (**TS**) | `expand_selection` |
|
||||
| `Alt-j` | Shrink syntax tree object selection (**TS**) | `shrink_selection` |
|
||||
| `Alt-h` | 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-k`/`Alt-up` | Expand selection to parent syntax node (**TS**) | `expand_selection` |
|
||||
| `Alt-j`/`Alt-down` | Shrink syntax tree object selection (**TS**) | `shrink_selection` |
|
||||
| `Alt-h`/`Alt-left` | Select previous sibling node in syntax tree (**TS**) | `select_prev_sibling` |
|
||||
| `Alt-l`/`Alt-right` | Select next sibling node in syntax tree (**TS**) | `select_next_sibling` |
|
||||
|
||||
### Search
|
||||
|
||||
|
@ -584,10 +584,10 @@ fn default() -> Self {
|
||||
"S" => split_selection,
|
||||
";" => collapse_selection,
|
||||
"A-;" => flip_selections,
|
||||
"A-k" => expand_selection,
|
||||
"A-j" => shrink_selection,
|
||||
"A-h" => select_prev_sibling,
|
||||
"A-l" => select_next_sibling,
|
||||
"A-k" | "A-up" => expand_selection,
|
||||
"A-j" | "A-down" => shrink_selection,
|
||||
"A-h" | "A-left" => select_prev_sibling,
|
||||
"A-l" | "A-right" => select_next_sibling,
|
||||
|
||||
"%" => select_all,
|
||||
"x" => extend_line,
|
||||
|
Loading…
Reference in New Issue
Block a user