Describe the bug
This is a followup to #4387. If one defines a mapping containing the literal backspace character (shown as ^H in vim) the behavior of vim and vscode differs. In vim the delete is performed, in vscode it inserts the literal delete character.
This sounds unimportant but backspaces are not uncommon in vim due to the old special behavior of how indents and backspace interacts. For instance this is a very common configuration in vim to fix up smartindent:
inoremap # X^H#
As vscode can load vimrc files I believe it's important to correctly replicate this behavior.
To Reproduce
Steps to reproduce the behavior:
Add a inoremap # X^H# mapping to the vimrc file (note that ^H is the literal backspace character. Can be inserted with ctrl+v followed by H)
Enable vim.vimrc.enable in the vscode config
Enter #
Observe X^H# being written to the buffer as opposed to #.
Expected behavior
Only # should be written as the inserted X should be deleted by the inserted ^H.
Screenshots
Environment (please complete the following information):
Describe the bug This is a followup to #4387. If one defines a mapping containing the literal backspace character (shown as
^H
in vim) the behavior of vim and vscode differs. In vim the delete is performed, in vscode it inserts the literal delete character.This sounds unimportant but backspaces are not uncommon in vim due to the old special behavior of how indents and backspace interacts. For instance this is a very common configuration in vim to fix up smartindent:
As vscode can load vimrc files I believe it's important to correctly replicate this behavior.
To Reproduce Steps to reproduce the behavior:
inoremap # X^H#
mapping to the vimrc file (note that^H
is the literal backspace character. Can be inserted with ctrl+v followed by H)vim.vimrc.enable
in the vscode config#
X^H#
being written to the buffer as opposed to#
.Expected behavior Only
#
should be written as the insertedX
should be deleted by the inserted^H
.Screenshots
Environment (please complete the following information):
Additional context
This is a followup report to #4387