by eviks · 2y ago · 0 comments
If I make a typo while in the insert mode I just remove last character or last word. I guess you could argue that this is something that undo should also cover but I don't see much need for that.
I'm not in the insert mode, exiting to normal mode for movement and undo. I'm in the normal mode entering insert mode to write.
The other issue with your attempt at solving undo without undo is that the deletion doesn't become part of redo, also a single word with a typo could be in the middle of a paragraph where you navigated with a trackpad, while ^W would delete near the current cursor position
You don't need magic to fix the ubersimplicity of current defaults, just a bit of openness
The alternatives are:
- Control-W (delete the last word, stay in insert mode)
- "W" to move back a word (or "B" to move back a big word). So: <Esc>BC
There's apparently also a recipe for setting up vim to insert undo points whenever you hit space, so you could also enable that for the files you want to do that on.The alternatives you suggest are bad: 1. This is no undo, so then it's not part of redo
2. Why would I ever want 3 undo points if I indent my comment a bit by 3 spaces?