Accumulating cut/paste like zsh in emacs mode
Related problem
In zsh, if you press Ctrl+W multiple times, all cut words get accumulated into a single buffer, and all of them will be inserted together (while preserving whitespaces in-between) when Ctrl+Y is pressed. At the same time, if perform any other action, it gets reset, and new Ctrl+W presses will start accumulating a new buffer from scratch.
This works assuming keybinds in zsh:
bindkey '^w' backward-kill-word
bindkey '^y' yank
I hope to be able to reproduce the same behavior in nu REPL.
Describe the solution you'd like
Probably a new config setting that will toggle this behavior globally.
I was initially thinking about just adding new keybind "edit" actions, like AccumulateCutWordLeft, but just this alone would not solve the resetting when other key is typed, which is also important, so a config setting seems more fitting.
Describe alternatives you've considered
No response
Additional context and details
No response
I don't think we necessarily need another config option, but there would need to be additional bookkeeping in the editor implementation to accumulate into the clipboard and resetting that when moves etc. happen.
There was an attempt to implement this in reedline with https://github.com/nushell/reedline/pull/631 that we sadly couldn't get over the finish line at the time.
It may serve as inspiration how it could be done.
Having that behavior for the emacs-like mode would certainly elevate our current hackjob of a vi emulation, by accumulating the edits. (would allow recovering multiplier deletes that are completely useless at the moment) In the long term we probably want to move of this bodged together vi-emulation and have two better principled implementations for more consistent behavior on either Emacs style edits or the modal editing.