on master help sign in
Mark macros as experimental in docs

Given that currently macro does not integrate well with registers and the internal representation of macros is expected to be changed.

commitb9cb3930e2838347a97f501e025ee52ea377ed52 authorIvan Tham <pickfire@riseup.net> dateSun 12 Dec 2021, 21:54 (5 years ago) parent9a32617
2 files changed+34−33
book/src/keymap.md+33−33 helix-term/src/commands.rs+1
book/src/keymap.md+33−33
@@ -46,39 +46,39 @@
4646
4747### Changes
4848
49−| Key | Description | Command |
50−| ----- | ----------- | ------- |
51−| `r` | Replace with a character | `replace` |
52−| `R` | Replace with yanked text | `replace_with_yanked` |
53−| `~` | Switch case of the selected text | `switch_case` |
54−| `` ` `` | Set the selected text to lower case | `switch_to_lowercase` |
55−| `` Alt-` `` | Set the selected text to upper case | `switch_to_uppercase` |
56−| `i` | Insert before selection | `insert_mode` |
57−| `a` | Insert after selection (append) | `append_mode` |
58−| `I` | Insert at the start of the line | `prepend_to_line` |
59−| `A` | Insert at the end of the line | `append_to_line` |
60−| `o` | Open new line below selection | `open_below` |
61−| `O` | Open new line above selection | `open_above` |
62−| `.` | Repeat last change | N/A |
63−| `u` | Undo change | `undo` |
64−| `U` | Redo change | `redo` |
65−| `Alt-u` | Move backward in history | `earlier` |
66−| `Alt-U` | Move forward in history | `later` |
67−| `y` | Yank selection | `yank` |
68−| `p` | Paste after selection | `paste_after` |
69−| `P` | Paste before selection | `paste_before` |
70−| `"` `<reg>` | Select a register to yank to or paste from | `select_register` |
71−| `>` | Indent selection | `indent` |
72−| `<` | Unindent selection | `unindent` |
73−| `=` | Format selection (currently nonfunctional/disabled) (**LSP**) | `format_selections` |
74−| `d` | Delete selection | `delete_selection` |
75−| `Alt-d` | Delete selection, without yanking | `delete_selection_noyank` |
76−| `c` | Change selection (delete and enter insert mode) | `change_selection` |
77−| `Alt-c` | Change selection (delete and enter insert mode, without yanking) | `change_selection_noyank` |
78−| `Ctrl-a` | Increment object (number) under cursor | `increment` |
79−| `Ctrl-x` | Decrement object (number) under cursor | `decrement` |
80−| `Q` | Start/stop macro recording to the selected register | `record_macro` |
81−| `q` | Play back a recorded macro from the selected register | `replay_macro` |
49+| Key | Description | Command |
50+| ----- | ----------- | ------- |
51+| `r` | Replace with a character | `replace` |
52+| `R` | Replace with yanked text | `replace_with_yanked` |
53+| `~` | Switch case of the selected text | `switch_case` |
54+| `` ` `` | Set the selected text to lower case | `switch_to_lowercase` |
55+| `` Alt-` `` | Set the selected text to upper case | `switch_to_uppercase` |
56+| `i` | Insert before selection | `insert_mode` |
57+| `a` | Insert after selection (append) | `append_mode` |
58+| `I` | Insert at the start of the line | `prepend_to_line` |
59+| `A` | Insert at the end of the line | `append_to_line` |
60+| `o` | Open new line below selection | `open_below` |
61+| `O` | Open new line above selection | `open_above` |
62+| `.` | Repeat last change | N/A |
63+| `u` | Undo change | `undo` |
64+| `U` | Redo change | `redo` |
65+| `Alt-u` | Move backward in history | `earlier` |
66+| `Alt-U` | Move forward in history | `later` |
67+| `y` | Yank selection | `yank` |
68+| `p` | Paste after selection | `paste_after` |
69+| `P` | Paste before selection | `paste_before` |
70+| `"` `<reg>` | Select a register to yank to or paste from | `select_register` |
71+| `>` | Indent selection | `indent` |
72+| `<` | Unindent selection | `unindent` |
73+| `=` | Format selection (currently nonfunctional/disabled) (**LSP**) | `format_selections` |
74+| `d` | Delete selection | `delete_selection` |
75+| `Alt-d` | Delete selection, without yanking | `delete_selection_noyank` |
76+| `c` | Change selection (delete and enter insert mode) | `change_selection` |
77+| `Alt-c` | Change selection (delete and enter insert mode, without yanking) | `change_selection_noyank` |
78+| `Ctrl-a` | Increment object (number) under cursor | `increment` |
79+| `Ctrl-x` | Decrement object (number) under cursor | `decrement` |
80+| `Q` | Start/stop macro recording to the selected register (experimental) | `record_macro` |
81+| `q` | Play back a recorded macro from the selected register (experimental) | `replay_macro` |
8282
8383#### Shell
8484
helix-term/src/commands.rs+1
@@ -6031,6 +6031,7 @@ fn record_macro(cx: &mut Context) {
60316031
60326032fn replay_macro(cx: &mut Context) {
60336033 let reg = cx.register.unwrap_or('@');
6034+ // TODO: macro keys should be parsed one by one and not space delimited (see kak)
60346035 let keys: Vec<KeyEvent> = if let Some([keys]) = cx.editor.registers.read(reg) {
60356036 match keys.split_whitespace().map(str::parse).collect() {
60366037 Ok(keys) => keys,