Tim Chase wrote:
You can easily add the following line to your .vimrc:

    nnoremap <bs> X

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.

It sounds like you might have had a trailing space after the "X" perhaps? This would move the cursor forward one character after doing what should be the correct behavior. So rather than "nnoremap <bs> X" you have "nnoremap <bs> X " (note the additional space)

You can type it directly at the command-line:

    :nnoremap <bs> X

and experiment without having to reload vim (to reload your vimrc) each time.

This is quite unnerving to a longtime 'deleter'  <g>

Understandably :)

I read the three :help items you mentioned and tried
:set backspace=indent,eol,start

This controls the behavior of what to do when you hit the beginning of a line/indentation/start-of-edit which is a handy option to have when you want it, but it sounds like your difficulties lie elsewhere.

Frankly I didn't understand what :he map was getting at.

It is a somewhat confusing section of the help to understand. It stems partially from the fact that mappings are such powerful things, it's hard to make their description simple. The whole file in which you arrive

    :help map.txt

has volumes of information that elucidate the dark corners of mappings, but perhaps at the cost of clarity.

I suspect that an extra trailing-space slipped in, and that its removal should solve your problem, as the mapping worked for me as you want.

Yes Tim that's exactly what happened. Got rid of the extraneous character and backspace is working perfectly now.

Thanks very much for your help.

--
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux

Reply via email to