on master help sign in
Rename I/A "Insert at start/end of line" (#3753)
dbec057Michael Davis
book/src/keymap.md+2−2
@@ -68,8 +68,8 @@
68| `` Alt-` `` | Set the selected text to upper case | `switch_to_uppercase` |
68| `` Alt-` `` | Set the selected text to upper case | `switch_to_uppercase` |
69| `i` | Insert before selection | `insert_mode` |
69| `i` | Insert before selection | `insert_mode` |
70| `a` | Insert after selection (append) | `append_mode` |
70| `a` | Insert after selection (append) | `append_mode` |
71−| `I` | Insert at the start of the line | `prepend_to_line` |
71+| `I` | Insert at the start of the line | `insert_at_line_start` |
72−| `A` | Insert at the end of the line | `append_to_line` |
72+| `A` | Insert at the end of the line | `insert_at_line_end` |
73| `o` | Open new line below selection | `open_below` |
73| `o` | Open new line below selection | `open_below` |
74| `O` | Open new line above selection | `open_above` |
74| `O` | Open new line above selection | `open_above` |
75| `.` | Repeat last insert | N/A |
75| `.` | Repeat last insert | N/A |
helix-term/src/commands.rs+4−4
@@ -273,8 +273,8 @@ impl MappableCommand {
273 diagnostics_picker, "Open diagnostic picker",
273 diagnostics_picker, "Open diagnostic picker",
274 workspace_diagnostics_picker, "Open workspace diagnostic picker",
274 workspace_diagnostics_picker, "Open workspace diagnostic picker",
275 last_picker, "Open last picker",
275 last_picker, "Open last picker",
276− prepend_to_line, "Insert at start of line",
276+ insert_at_line_start, "Insert at start of line",
277− append_to_line, "Append to end of line",
277+ insert_at_line_end, "Insert at end of line",
278 open_below, "Open new line below selection",
278 open_below, "Open new line below selection",
279 open_above, "Open new line above selection",
279 open_above, "Open new line above selection",
280 normal_mode, "Enter normal mode",
280 normal_mode, "Enter normal mode",
@@ -2483,13 +2483,13 @@ fn last_picker(cx: &mut Context) {
2483}
2483}
2484
2484
2485// I inserts at the first nonwhitespace character of each line with a selection
2485// I inserts at the first nonwhitespace character of each line with a selection
2486−fn prepend_to_line(cx: &mut Context) {
2486+fn insert_at_line_start(cx: &mut Context) {
2487 goto_first_nonwhitespace(cx);
2487 goto_first_nonwhitespace(cx);
2488 enter_insert_mode(cx);
2488 enter_insert_mode(cx);
2489}
2489}
2490
2490
2491// A inserts at the end of each line with a selection
2491// A inserts at the end of each line with a selection
2492−fn append_to_line(cx: &mut Context) {
2492+fn insert_at_line_end(cx: &mut Context) {
2493 enter_insert_mode(cx);
2493 enter_insert_mode(cx);
2494 let (view, doc) = current!(cx.editor);
2494 let (view, doc) = current!(cx.editor);
2495
2495
helix-term/src/keymap/default.rs+2−2
@@ -59,9 +59,9 @@ pub fn default() -> HashMap<Mode, Keymap> {
59 ":" => command_mode,
59 ":" => command_mode,
60
60
61 "i" => insert_mode,
61 "i" => insert_mode,
62− "I" => prepend_to_line,
62+ "I" => insert_at_line_start,
63 "a" => append_mode,
63 "a" => append_mode,
64− "A" => append_to_line,
64+ "A" => insert_at_line_end,
65 "o" => open_below,
65 "o" => open_below,
66 "O" => open_above,
66 "O" => open_above,
67
67