I would think this would work to make backspace delete the entire previous word in insert mode:
imap <BS> <C-W>
but it doesn't. Tried in vim 8.0 and neovim 0.2.2 iterm2 if that matters.
Any way to accomplish this?
Update
Per comments below (and after reading the linked question) I've done the following:
- switched to
inoremap(didn't fix) - tested the output of
:imap <BS>.
The output was the following:
i <BS> *@<RC>=AutoPairsDelete()<CR>
i <BS> * <C-W>
Removing the autopairs plugin makes backspacing over words work correctly, but I like that plugin and would like to have both behaviors.
:imap <BS>? It looks okay? BTW always use the non-remapping varieties of map (nnoremap,inoremap, etc.) unless you have a good reason to do otherwise. Not saying that's going to fix your problem but at least that variable will be removed from the equation. Also try starting vim with-u NONEto set baseline config. – B Layer Oct 07 '18 at 07:52-uflag, it did help me figure out part of the problem. – Jared Smith Oct 07 '18 at 18:53