-
Notifications
You must be signed in to change notification settings - Fork 722
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
Add hook to notify that a register has been modified #859
Comments
Huh, I should have know there would already be an issue for this. Here's the text of the issue I was about to create: DescriptionIn the style of RegisterWrite: Triggered after text has been written to a register, filtering text is the register name. While this hook is being executed, no further RegisterRead or RegisterWrite hooks for this register will be triggered. RegisterRead: Triggered before text is read from a register, filtering text is the register name. While this hook is being executed, no further RegisterRead or RegisterWrite hooks for this register will be triggered. RationaleThere's lots of potential uses for this functionality:
AlternativesThe Registers & Clipboard wiki page already has some suggestions for integrating kakoune with the system clipboard, but honestly I would much rather hit The vis editor does not support register hooks, but it has special Vim also does not support register hooks, and completely hard-codes the behaviour of its |
An implementation of the RegisterChanged hook can be found here: https://github.com/doppioandante/kakoune/tree/register-hooks It is buggy (as @Screwtapello says it shouldn't fire anymore in case of changes made by the hook itself). |
I would like this functionality as well to generalize the Yank Ring to all kind of register; for example, refreshing an old search with |
Would make integrating with OS clipboard a lot easier as it can be automatically injected to all yank operations. |
This also seems useful to me, but my only actual use case is also clipboard. I currently copy |
Nice! |
Hi,
As discussed in #838, it'd be useful to have a hook to know when registers are modified, with filtering based on which register is modified.
The text was updated successfully, but these errors were encountered: