diff options
author | Michael Davis | 2022-10-03 15:05:08 +0000 |
---|---|---|
committer | GitHub | 2022-10-03 15:05:08 +0000 |
commit | dbec057363201d6c4aa2e7258cac928e5ebb6a28 (patch) | |
tree | b3a5e8ce8e70470f67af899f7554b094c9532b8a /helix-term/src | |
parent | 772af7ffb1d3a4ae22505693ae803c8d852336f3 (diff) |
Rename I/A "Insert at start/end of line" (#3753)
* keymap: Rename A "Insert at end of line"
The language for the `A` binding is potentially confusing because
`A` behaves like `i` done at the end of the line rather than `a`.
This change renames the command to match Kakoune's language[^1].
[^1]: https://github.com/mawww/kakoune/blob/021da117cf90bf25b65e3344fa8e43ab4262b714/src/normal.cc#L2229
* keymap: Rename I `insert_at_line_start`
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/commands.rs | 8 | ||||
-rw-r--r-- | helix-term/src/keymap/default.rs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 470abe8e..79b62e23 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -273,8 +273,8 @@ impl MappableCommand { diagnostics_picker, "Open diagnostic picker", workspace_diagnostics_picker, "Open workspace diagnostic picker", last_picker, "Open last picker", - prepend_to_line, "Insert at start of line", - append_to_line, "Append to end of line", + insert_at_line_start, "Insert at start of line", + insert_at_line_end, "Insert at end of line", open_below, "Open new line below selection", open_above, "Open new line above selection", normal_mode, "Enter normal mode", @@ -2483,13 +2483,13 @@ fn last_picker(cx: &mut Context) { } // I inserts at the first nonwhitespace character of each line with a selection -fn prepend_to_line(cx: &mut Context) { +fn insert_at_line_start(cx: &mut Context) { goto_first_nonwhitespace(cx); enter_insert_mode(cx); } // A inserts at the end of each line with a selection -fn append_to_line(cx: &mut Context) { +fn insert_at_line_end(cx: &mut Context) { enter_insert_mode(cx); let (view, doc) = current!(cx.editor); diff --git a/helix-term/src/keymap/default.rs b/helix-term/src/keymap/default.rs index bad5a81a..4da609ec 100644 --- a/helix-term/src/keymap/default.rs +++ b/helix-term/src/keymap/default.rs @@ -59,9 +59,9 @@ pub fn default() -> HashMap<Mode, Keymap> { ":" => command_mode, "i" => insert_mode, - "I" => prepend_to_line, + "I" => insert_at_line_start, "a" => append_mode, - "A" => append_to_line, + "A" => insert_at_line_end, "o" => open_below, "O" => open_above, |