-
Notifications
You must be signed in to change notification settings - Fork 149
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
Macro not recording auto-completion result #791
Comments
Thank you for letting us know. I can reproduce that recording a macro and doing command completion in Insert mode does not record the final text in the macro. However, is this exactly what you are talking about? Just to be clear, while the "repeat insert" works (i.e. pressing .), Vrapper never records that you start command completion and select the second item. Instead the repeat will simply insert the same text as edited the last time Insert mode was used. In other words, the fix I'm thinking of will simply record the text result from the last insert session but it won't do a real command completion. I appreciate the feedback. |
That fix was what I had in mind. Great to have such a swift response. Thanks.
From: Bert Jacobs<mailto:notifications@github.com>
Sent: Saturday, September 16, 2017 5:47 PM
To: vrapper/vrapper<mailto:vrapper@noreply.github.com>
Cc: yishayw<mailto:yishayjobs@hotmail.com>; Author<mailto:author@noreply.github.com>
Subject: Re: [vrapper/vrapper] Macro not recording auto-completion result (#791)
Thank you for letting us know.
I can reproduce that recording a macro and doing command completion in Insert mode does not record the final text in the macro.
However, is this exactly what you are talking about? Just to be clear, while the "repeat insert" works (i.e. pressing .), Vrapper never records that you start command completion and select the second item. Instead the repeat will simply insert the same text as edited the last time Insert mode was used.
In other words, the fix I'm thinking of will simply record the text result from the last insert session but it won't do a real command completion.
Please let us know.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#791 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACASfZ01mgL1StVWYxNNwbRyz_liivJFks5si9-PgaJpZM4PUNmM>.
|
Ok, I have been thinking some more about this and it sounds like it is possible. What I'm more concerned about is the change in behaviour: as it stands, the macro recorder captures all keypresses (as long as those don't trigger Eclipse editing features like auto complete). This means that changing it to capture just the final text would then no longer run Insert mode remaps, but those could be context-sensitive and hence might need to be executed every single time. Also, the new code would "fake" a bunch of keypresses so that the macro contains all text as it finally looked during the macro recording, but that text may inadvertently trigger Insert mode remaps during a replay of the macro. This is why I'm inclined to put in a new option which switches the behavior and support both old and new recording modes. I'll then have to discuss with @keforbes what the new default should be. |
@albertdev, how would you capture the final text? Would you check to see if we're recording when we exit insert mode and if so, capture whatever was entered? For what it's worth, 5 years ago I mentioned an issue where using the arrow keys while in insert mode wouldn't be captured by a macro. That issue is now fixed. Would we be able to ensure that non-text key presses (arrow keys) while in insert mode would still be captured in the macro if we're just capturing the final text entered? |
@keforbes that is a valid remark. Since I was thinking of just capturing the text when we exit Insert mode that arrow-key-recording feature would no longer work. Of course, if this new behavior can be enabled or disabled by an option then you can always choose to toggle it when you record a macro or set the desired default behavior from your Your remark shows though that we can't make it the default as that would surprise our existing users or new people who want a Vim-like experience. |
Steps to reproduce:
Desired result: the result of pressing
<enter>
will appear in the played macro result.Actual result: Only some-keys appear, so I have to manually complete on each macro replay
The text was updated successfully, but these errors were encountered: