Make pasting replace the entire selection #7768
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey folks.
I don't think anyone asked for this, but it's an idea that would improve my productivity at least.
In vim, you can make a selection and then "p" to replace the selection with whatever you have yanked. I used to do this a ton in vim. It's one way to work around #3001.
This PR makes non-linewise selections replaced when pasting onto them.
Kooha-2023-07-28-16-29-38.webm
This is a breaking change so I don't really expect a merge as-is. Just wanted to bring up the idea and do some legwork as well. One alternative could be to implement this as a separate command and bind it to, say,
a-p
.Anyway let me know what you think. If you have time.