-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REQUEST: Option for "Backspace as Undo" #20
Comments
Yeah I'd like to see this too. Yes you can just use ctrl-z or left arrow, but your brain is so wired to hitting the backspace key after making a typo that I do this all the time. |
I would rather like a new setting called "overtype.backspaceAction" setting:
|
That would indeed be great. The "replace" option would actually replace the character currently in front of the caret, then move the caret back by 1 position. Example:
Bikeshedding a little considering nobody seems to be working on this, but this might be worth considering:
|
There are three possible meanings for the backspace key in overtype mode that make sense to me personally:
I really hate 1, because to me the entire point of overtype mode is that everything to the right of the cursor stays where it is. Though I hate the existing behavior, I think it makes sense to at least keep it as an option so that people who are used to it can continue to use it like that. The difference between 2 and 3 is that 3 is "destructive", which at least conceptually makes some sense to me. It literally would be like typing a space, except moving backward instead of forward. While I think I understand the appeal of a single-character-undo behavior for the backspace key, I suspect it might be a little tricky to implement (because it's different than Ctrl+Z, which will undo an entire "batch" of keystrokes that VS Code has deemed to be one operation); and if you move the cursor using the arrow keys or mouse, and then press backspace, what should happen? The only sensible thing at that point would be one of the three choices I presented above. |
Building upon this, the one feature I had mentioned in #32 (which I closed since it is similar to this one) was having a similar option for the delete character (ie move the cursor forwards, since replacing with a space is covered by the spacebar) |
Please add a Settings option for "Backspace as Undo in Overtype mode" - so when in Overtype mode, hitting Backspace would simply undo the last character insertion, which would leave the line structure/spacing undisturbed.
The text was updated successfully, but these errors were encountered: