readline.nvim icon indicating copy to clipboard operation
readline.nvim copied to clipboard

[Feature Request] Undo in Command-line mode

Open hiberabyss opened this issue 3 years ago • 3 comments

hiberabyss avatar Sep 01 '22 08:09 hiberabyss

You can undo from Insert mode with <C-o>u. So, does this solve your problem?

:imap <C-_> <C-o>u

andmis avatar Sep 01 '22 13:09 andmis

Want to use in cmdline mode, this seems did not work.

hiberabyss avatar Sep 01 '22 13:09 hiberabyss

I have no plans to implement this personally, but if someone PRs it I would be glad to merge.

FWIW, I think the simplest way to implement this would be to keep an undo stack with snapshots of the command line, updated every time we make an edit and perhaps occasionally in response to normal user edits. AFAIK Neovim does not support undo in the command line.

andmis avatar Oct 10 '22 00:10 andmis