-
-
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
Save an undo checkpoint before paste in insert mode #8121
Save an undo checkpoint before paste in insert mode #8121
Conversation
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.
I agree with this 👍 Should we also do the same thing for the various paste commands in insert mode? It would seem odd if bracketed paste does this but a cumst binding like a-v
wouldn't
Yeah we could do this in |
6c119f0
to
1657aec
Compare
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.
A I keep forgetting about c-r
, even tough it's such a nice binding 😅 Considering that c-r is a default binding it makes even more sense to create a checkpoint here 👍
Somewhat related to #7226 ? Should merge both in tandem |
e2a8774 from that PR is actually almost the same as the original version of this PR I think? The changes to :write are probably orthogonal |
Ah yeah actually I didn't notice that part. That part could be dropped after this change. It's saving after the paste which is a little different behavior-wise. I believe we want to save before the paste though not after. |
I often paste and find out that my clipboard didn't have what I expected on it. Previously, undoing the change (
u
in normal mode) would also undo everything else I added in insert mode which is usually too much.