cursorless
cursorless copied to clipboard
Undo triggers in wrong file when using split windows
Not sure if this is a bug or a configuration issue:
When using a split editor, issuing an undo command will always undo the last edit that was done in the current file. But when working with two files in a split view, this is often not the desired outcome. I would expect it to always undo the last command/edit across all files. This is especially annoying when running into a recognition error, or when using the wrong hat. In my setup it's trivial to reproduce, but please let me know if there's more info I could provide.
That being said, many thanks for your work on cursorless, it's really great! π
Glad you're liking Cursorless! βΊοΈ
Undo is a VSCode feature, so maybe it would make sense to file the issue there? We have no control over VSCode's built-in undo functionality
It's a tricky point, because I can't imagine most keyboard users would be happy with undo-s that switch around between the visible split editors. When using the keyboard, I think it does make more sense to undo only in the current editor. Anyway, I think this requires some more consideration.
Yeah it's a fair point. Fwiw here are some relevant links:
- #317
- https://github.com/paul-schaaf/big-undo (haven't tried it yet, and not sure if it's cross-editor, but seems relevant)
You can also use a Cursorless custom action if you want to be able to undo and redo across a split
"undo blue air"
undo, undo
redo, redo
https://github.com/AndreasArvidsson/andreas-talon/blob/23b7da3a62057c54f33f22d30f018ae8c896d8c0/settings/cursorless-settings/experimental/actions_custom.csv#L6-L7
You can also use a Cursorless custom action if you want to be able to undo and redo across a split
"undo blue air"
How did that never occur to me π . Are you using that?
Btw if you unmap "undo that", then for actions that only target one split, saying "undo that" would just work in the right split π€. We could even support commands that group by editor and run once for each editor and it would just undo in multiple splits if necessary π
Yes :)
I'm already using that. For me it's just undo and undo last where last is the Cursorless that mark
that's great. added myself π
Just did the same for save:
disk, workbench.action.files.save
So now I can say "round wrap air" in opposite split then "disk that"
Just did the same for save:
disk, workbench.action.files.saveSo now I can say "round wrap air" in opposite split then "disk that"
Nice. I have disk files to save all open files which I use kinda similarly.
Nice. I have disk files to save all open files which I use kinda similarly.
Yeah that's what I usually use but I like the precision of this one, because sometimes that triggers annoying save untitled popup