4 ms·
> Type a sentence quickly and then hit undo. You don't want that to just undo literally the last character. I am continually irritated by this behavior. Yes,
by reificator 7y ago
> Type a sentence quickly and then hit undo. You don't want that to just undo literally the last character.
I am continually irritated by this behavior.
Yes, I do want to undo one operation. If I need to go fast and have little regard for correctness I can hold the button down.
Don't make me play the game where I hit undo, it undoes the whole sentence (or several), so I hit redo to bring it all back, and then I have to click backspace 5 times to get to where I wanted. Worse when I'm using multiple cursors and doing operations of different lengths to each line.
- weaksauce 7y agoUndo is an transactional operation... backspace five times is precisely what backspace is for and would make undo less powerful if it undid every single keystroke.
- reificator 7y agoMy problem is that my mental model for what is an undoable transaction is almost always smaller than the editor's, to the point where I try to undo, get surprised by how much was lost, and then redo and control+backspace until I've deleted what I need.
- parliament32 7y agoSounds like you need Vim in your life. To keep things short: Whenever you want to insert some text you need to switch to Insert mode. When you're done you Esc out back to Normal mode. Undo will undo everything you did inside the last Insert.
- reificator 7y ago> Sounds like you need Vim in your life. > To keep things short: Whenever you want to insert some text you need to switch to Insert mode. When you're done you Esc out back to Normal mode. Undo will undo everything you did inside the last Insert. That's a more extreme version of the behavior I'm objecting to. Why would I prefer that?
- parliament32 7y agoI'm having trouble understanding what you want. Undo is for undoing an action, like inserting a bunch of text. If you want to delete one character at a time backwards... use the backspace key?
- reificator 7y agoHonestly the issue is mostly due to wanting a slightly smaller, but not one character, undo. I think the problem is just that the things that I view as pauses and separate actions are almost always shorter than what the undo function sees, and undo undoes enough that it's quicker to redo and backspace than retype.
- bin0 7y agoStill use vim. You can use something like "5db" to delete the previous 5 words. For more precision, "5X" will delete your last five characters. And if you have a very specific use case, macros are a big help. If you have a very specific and recurring use case, you can script in vim script, ruby, perl, python (2 & 3), tcl, racket, and lua. There may well be support for others of which I am not aware.
- toast0 7y ago> That's a more extreme version of the behavior I'm objecting to. Why would I prefer that? Put something in the wrong place (probably via pasting, but it's not always clear to a screen editor if you pasted or just typed quickly)
- reificator 7y agoTypically when I paste something, I type something beforehand, and then paste it in, undo it, and it undoes what I typed before. This is worse when I'm using multiple cursors, which is usually me manually cleaning up some data.