on master help sign in
Change parameter object keybind from `p` to `a` (#1708)

This is largely to avoid a collision with the soon to be merged paragraph object which takes up the p key.

commitb0aaf089958f59b3d7a1eb03dbb46db8f9a2b914 authorGokul Soumya <gokulps15@gmail.com> dateMon 7 Mar 2022, 13:16 (5 years ago) parent79caa7b
4 files changed+7−7
book/src/keymap.md+2−2 book/src/usage.md+1−1 helix-term/src/commands.rs+2−2 helix-term/src/keymap.rs+2−2
book/src/keymap.md+2−2
@@ -268,8 +268,8 @@ Mappings in the style of [vim-unimpaired](https://github.com/tpope/vim-unimpaire
268268| `[f` | Go to previous function (**TS**) | `goto_prev_function` |
269269| `]c` | Go to next class (**TS**) | `goto_next_class` |
270270| `[c` | Go to previous class (**TS**) | `goto_prev_class` |
271−| `]p` | Go to next parameter (**TS**) | `goto_next_parameter` |
272−| `[p` | Go to previous parameter (**TS**) | `goto_prev_parameter` |
271+| `]a` | Go to next argument/parameter (**TS**) | `goto_next_parameter` |
272+| `[a` | Go to previous argument/parameter (**TS**) | `goto_prev_parameter` |
273273| `]o` | Go to next comment (**TS**) | `goto_next_comment` |
274274| `[o` | Go to previous comment (**TS**) | `goto_prev_comment` |
275275| `[space` | Add newline above | `add_newline_above` |
book/src/usage.md+1−1
@@ -68,7 +68,7 @@ Currently supported: `word`, `surround`, `function`, `class`, `parameter`.
6868| `(`, `[`, `'`, etc | Specified surround pairs |
6969| `f` | Function |
7070| `c` | Class |
71−| `p` | Parameter |
71+| `a` | Argument/parameter |
7272| `o` | Comment |
7373
7474> NOTE: `f`, `c`, etc need a tree-sitter grammar active for the current
helix-term/src/commands.rs+2−2
@@ -3965,7 +3965,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
39653965 'W' => textobject::textobject_word(text, range, objtype, count, true),
39663966 'c' => textobject_treesitter("class", range),
39673967 'f' => textobject_treesitter("function", range),
3968− 'p' => textobject_treesitter("parameter", range),
3968+ 'a' => textobject_treesitter("parameter", range),
39693969 'o' => textobject_treesitter("comment", range),
39703970 'm' => {
39713971 let ch = text.char(range.cursor(text));
@@ -3999,7 +3999,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
39993999 ("W", "WORD"),
40004000 ("c", "Class (tree-sitter)"),
40014001 ("f", "Function (tree-sitter)"),
4002− ("p", "Parameter (tree-sitter)"),
4002+ ("a", "Argument/parameter (tree-sitter)"),
40034003 ("o", "Comment (tree-sitter)"),
40044004 ("m", "Matching delimiter under cursor"),
40054005 (" ", "... or any character acting as a pair"),
helix-term/src/keymap.rs+2−2
@@ -607,7 +607,7 @@ impl Default for Keymaps {
607607 "D" => goto_first_diag,
608608 "f" => goto_prev_function,
609609 "c" => goto_prev_class,
610− "p" => goto_prev_parameter,
610+ "a" => goto_prev_parameter,
611611 "o" => goto_prev_comment,
612612 "space" => add_newline_above,
613613 },
@@ -616,7 +616,7 @@ impl Default for Keymaps {
616616 "D" => goto_last_diag,
617617 "f" => goto_next_function,
618618 "c" => goto_next_class,
619− "p" => goto_next_parameter,
619+ "a" => goto_next_parameter,
620620 "o" => goto_next_comment,
621621 "space" => add_newline_below,
622622 },