-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor macros and mark as experimental #1253
Conversation
Keypress delimiting has been addressed here pickfire#1 |
I'm not sure we want this, since that makes
|
Since keys also have longer names, I thought this made them more readable: |
|
One of the reason for this patch is And space delimited have an issue. Try @Omnikar But I think besides looking at |
I guess this should be good now. But https://github.com/helix-editor/helix/runs/4528007282?check_suite_focus=true is that a spurious failure? I run |
You probably need to rebase to catch up with latest master |
Macro needs to be defined first before playing so replay is more accurate. Also, replay have the same length as record which makes it looks nice.
Given that currently macro does not integrate well with registers and the internal representation of macros is expected to be changed.
* Keypresses are no longer separated by spaces * Single-character keypresses are serialized as-is * Multi-character keypresses are delimited by `<>`
So, is there anything blocking this? I'd really like to see this get merged. |
helix-term/src/commands.rs
Outdated
Err(e) => { | ||
cx.editor.set_error(format!("{}", e)); | ||
return; | ||
// TODO: macro keys should be parsed one by one and not space delimited (see kak) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It generally looks good, but can we extract this to helix-view and add some unit tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah; and I'm going to need the extracted macro parsing functionality for #997 too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pickfire I have done this in pickfire#2.
cc @Omnikar
This does not solve the macro internal representation issues but it should be a quick fix for now for some of the issues mentioned in #1234
Leftover
move macro display to status bar (not sure if it's better since doom emacs move to normal status line unlike vim)