Introduce "yankOnDelete" option that controls, if deleted text is yanked or discarded.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Is your feature request related to a problem? Please describe.
I use VSCodeVim with system clipboard integration and it is frustrating to get the clipboard overridden by every single delete/change operator.
Describe the solution you'd like
I propose to introduce a boolean "yankOnDelete" option.
True (default) - nothing changes.
False - change and delete operators do not yank deleted text.
Describe alternatives you've considered
The problem can be solved by remapping all delete and change operators linking then by default to /dev/null register. However, this solution is tedious and requires a dozen normal and visual mode remaps. In my opinion, providing a complete and consistent way to perform all these remaps would be beneficial.
Additional context
- The option would work best with an extra "move" operator that deletes AND yanks the deleted text. If accepted by the community, I'll happily implement it as well.
- Internally yankOnDelete option is already implemented as a flag of DeleteOperator.
I've already implemented it locally and will be happy to submit a pull-request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at DeleteOperator, where the issue says the yankOnDelete flag already exists, and trace how delete and change operators write to registers. No file or test is named, so locate the relevant option and operator handling first. Done means the default preserves current yanking behavior while false discards deleted text consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100