Closed bowernite closed 4 years ago
Does this always happen or just sometimes? Can you go into VSCode's keyboard shortcuts and show all the mappings you have for backspace? Like this:
AFAIK, it happens always. I reloaded the window and tried multiple files, and it still seems to happen.
Here are my keybindings:
This one's your issue (notice it says "User" on the right?) Right click and reset the keybinding and it should work
Ah, you're totally right. This override was to enable "hungry/smart backspace" functionality I have in Vim when editing.
In case anyone else runs into this, the fix is to have the following overrides in keybindings.json
:
// Cancel the original vim backspace
{
"key": "backspace",
"command": "-extension.vim_backspace",
"when": "editorTextFocus && vim.active && !inDebugRepl"
},
// Enable the vim backspace only in search mode or ex mode
{
"key": "backspace",
"command": "extension.vim_backspace",
"when": "editorTextFocus && vim.active && !inDebugRepl && (vim.mode == 'SearchInProgressMode' || vim.mode == 'CommandlineInProgress'"
}
Appreciate you looking into this @J-Fields 🙂
Describe the bug When typing an ex (
:<...>
) command, hitting backspace deletes text before the cursor instead of the text in the command I'm typingTo Reproduce Steps to reproduce the behavior:
:jumpt
(typo'djumps
)backspace
Expected behavior The command should now read
:jump
, and the text in the file should remain unchangedActual behavior The command still reads
:jumpt
, and the character before the cursor in the file is deleted.Screenshots Recording: https://streamable.com/okvwb6
Environment (please complete the following information):
v1.17.1
1.50.1
macOS 10.15.6
Additional context I disabled all my remappings to see if it was related, but the bug persisted.