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.
pull/1763/head
Gokul Soumya 3 years ago committed by GitHub
parent 79caa7b72b
commit b0aaf08995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -268,8 +268,8 @@ Mappings in the style of [vim-unimpaired](https://github.com/tpope/vim-unimpaire
| `[f` | Go to previous function (**TS**) | `goto_prev_function` | | `[f` | Go to previous function (**TS**) | `goto_prev_function` |
| `]c` | Go to next class (**TS**) | `goto_next_class` | | `]c` | Go to next class (**TS**) | `goto_next_class` |
| `[c` | Go to previous class (**TS**) | `goto_prev_class` | | `[c` | Go to previous class (**TS**) | `goto_prev_class` |
| `]p` | Go to next parameter (**TS**) | `goto_next_parameter` | | `]a` | Go to next argument/parameter (**TS**) | `goto_next_parameter` |
| `[p` | Go to previous parameter (**TS**) | `goto_prev_parameter` | | `[a` | Go to previous argument/parameter (**TS**) | `goto_prev_parameter` |
| `]o` | Go to next comment (**TS**) | `goto_next_comment` | | `]o` | Go to next comment (**TS**) | `goto_next_comment` |
| `[o` | Go to previous comment (**TS**) | `goto_prev_comment` | | `[o` | Go to previous comment (**TS**) | `goto_prev_comment` |
| `[space` | Add newline above | `add_newline_above` | | `[space` | Add newline above | `add_newline_above` |

@ -68,7 +68,7 @@ Currently supported: `word`, `surround`, `function`, `class`, `parameter`.
| `(`, `[`, `'`, etc | Specified surround pairs | | `(`, `[`, `'`, etc | Specified surround pairs |
| `f` | Function | | `f` | Function |
| `c` | Class | | `c` | Class |
| `p` | Parameter | | `a` | Argument/parameter |
| `o` | Comment | | `o` | Comment |
> NOTE: `f`, `c`, etc need a tree-sitter grammar active for the current > NOTE: `f`, `c`, etc need a tree-sitter grammar active for the current

@ -3965,7 +3965,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
'W' => textobject::textobject_word(text, range, objtype, count, true), 'W' => textobject::textobject_word(text, range, objtype, count, true),
'c' => textobject_treesitter("class", range), 'c' => textobject_treesitter("class", range),
'f' => textobject_treesitter("function", range), 'f' => textobject_treesitter("function", range),
'p' => textobject_treesitter("parameter", range), 'a' => textobject_treesitter("parameter", range),
'o' => textobject_treesitter("comment", range), 'o' => textobject_treesitter("comment", range),
'm' => { 'm' => {
let ch = text.char(range.cursor(text)); let ch = text.char(range.cursor(text));
@ -3999,7 +3999,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
("W", "WORD"), ("W", "WORD"),
("c", "Class (tree-sitter)"), ("c", "Class (tree-sitter)"),
("f", "Function (tree-sitter)"), ("f", "Function (tree-sitter)"),
("p", "Parameter (tree-sitter)"), ("a", "Argument/parameter (tree-sitter)"),
("o", "Comment (tree-sitter)"), ("o", "Comment (tree-sitter)"),
("m", "Matching delimiter under cursor"), ("m", "Matching delimiter under cursor"),
(" ", "... or any character acting as a pair"), (" ", "... or any character acting as a pair"),

@ -607,7 +607,7 @@ impl Default for Keymaps {
"D" => goto_first_diag, "D" => goto_first_diag,
"f" => goto_prev_function, "f" => goto_prev_function,
"c" => goto_prev_class, "c" => goto_prev_class,
"p" => goto_prev_parameter, "a" => goto_prev_parameter,
"o" => goto_prev_comment, "o" => goto_prev_comment,
"space" => add_newline_above, "space" => add_newline_above,
}, },
@ -616,7 +616,7 @@ impl Default for Keymaps {
"D" => goto_last_diag, "D" => goto_last_diag,
"f" => goto_next_function, "f" => goto_next_function,
"c" => goto_next_class, "c" => goto_next_class,
"p" => goto_next_parameter, "a" => goto_next_parameter,
"o" => goto_next_comment, "o" => goto_next_comment,
"space" => add_newline_below, "space" => add_newline_below,
}, },

Loading…
Cancel
Save