Skip to content
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

deleting text in command mode replaces the contents of the clipboard #1153

Open
russ-te2 opened this issue Jul 25, 2021 · 1 comment
Open

Comments

@russ-te2
Copy link

Often I want to paste a line of text from another source into an existing line, when deleting the
relevant parts of the target line this clobbers the previous contents of the clipboard, rendering
command+v useless. Is there a way to disable this behaviour?

@keevan
Copy link

keevan commented Nov 11, 2021

This is quite normal/default vim behaviour. You might find visually selecting what you want to delete v + movement, then pasting p an alternative to your problem.

That said, there is an option for you to accomplish what you originally wanted, just from configuration, using something called the blackhole register. For example, if you want all delete commands to never populate the clipboard (and instead be sucked into a black hole), you'd add delete* as the configuration value

Example:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants