Tim Chase wrote:
What is the proper way to have a destructive backspace key in command
mode that works like the X key in vim version 6.4.6.
That is, the backspace key should move to the left and delete the
character there.
Currently my backspace key backspaces but does not delete the
character to the left. All other programs in my Kubuntu 6.10 work
properly.
Insert mode works correctly.
Is it possible to 'alias' the X key to backspace?
I do not want to change any Linix config files except .vimrc
You can easily add the following line to your .vimrc:
nnoremap <bs> X
(typed literally with greater-than and less-than signs) which will do
exactly as you describe, "alias"ing the backspace key to behave like "X".
This is actually described here:
:help <bs>
You can learn more about vim's remapping abilities here:
:help :map
and more about the key-notation used:
:help <>
Thanks for your very prompt reply Tim.
After putting 'nnoremap <bs> X
in ~.vimrc I see that backspace works differently than X.
X will move the cursor left, deleting the character that was there, and
'pulling' all the text that was to the right over one character.
Backspace now deletes the character to the left and 'pulls' the text,
but the cursor does not move. The result is that repeated backspaces
now delete text to the _right_ instead of to the _left_ as X does.
This is quite unnerving to a longtime 'deleter' <g>
I read the three :help items you mentioned and tried
:set backspace=indent,eol,start
and
:set backspace=indent,eol,start
but neither did want I want.
Frankly I didn't understand what :he map was getting at.
Is there any way to get the conventional backspace behavior I'm used to?
Larry
--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux