I want Backspace
key to remove only one space all the time, but after installing delimitMate, it removes extra space. Let's say I want to type the code below.
let hello = "some text";
While I'm typing this, I accidentally type extra space after hello
, so there are two spaces between hello
and my cursor as follows.
let hello |
And, at this point, I decide to remove one space with Backspace
, but it removes two spaces instead, so the cursor ends up next to o
as in hello
as follows.
let hello|
Now, I have to type space again to make sure there is one space between hello
and =
. This is redundant and I don't like this. Does anyone know how to make Backspace
remove only one space all the time with delimitMate installed?
Edit:
Thanks to the comment from B Layer, I found the mapping that was causing this. After commenting out the mapping code, I was able to remove only one space with Backspace
key, but now when I delete a matching pair, it only deletes the opening one, and the closing one stays intact.
Before
{|}
Input
<BS>
After
}
Backspace
command"? Do you just mean the backspace key? If so does:imap <bs>
show anything? If so, try:verbose imap <bs>
to see where the mapping is being created.:verbose imap <bs>
showed thatsilent! imap <unique> <buffer> <BS> <Plug>delimitMateBS
was the mapping, but I don't know how to fix it.