tpope/vim-rsi — pull request #3 by jdelkins (2013-02-05 14:44:04+00:00)
Title: Upstream integration

# Add support for as delete-backward-word

Although `` is perfectly useful already, one of the readline key bindings I use a lot is `` ("delete-backward-word"). However, implementing this is complicated by the fact that it is apparently impossible(?) to get the actual backspace key within vim. Attempts to, for example,

exe "set =\\"

result in `` being set to `<80>fb`, which is probably some internal indirect reference to the termcap variable, and, moreover, doesn't work. Inexplicably, as well, one cannot retrieve the value of &t_xx (&t_fb specifically is what we want here) termcap options in vim script.

As far as I know, in the modern era, terminals generally use either `` or `` for backspace; and sometimes these are transposed with the bindings for ``. My brutish solution is to bind both `` and `` to the desired function. The consequence is that, for some terminals, `` might be bound to the same as ``, but I don't think `` means anything in readline anyhow.