Description of problem: The default erase key for Linux is set to ^? (xterm). Therefore when using the vi editing mode, when in command mode it would advantageous to be able to backspace using ^? (this is in addition to the h and ^H keys) as it is for the editing mode. For example this is how it is on SCO OpenServer’s ksh (I thinks it’s version is @(#)Version 11/16/88g). Version-Release number of selected component (if applicable): @(#)PD KSH v5.2.14 99/07/13.2 How reproducible: Always reproducible. Steps to Reproduce: 1. Check that your erase key is set to ^? using stty. 2. EDITOR=vi; export EDITOR #To use vi editing mode. 3. Now enter the input line editing command mode and try to backspace, you should see that it does not. Actual results: Does not backspace. Expected results: Should backspace. Additional info: I have also submitted this to pdksh.ca which according to http://www.cs.mun.ca/~michael/pdksh/ is the place to log bugs, but I think it may be preferable to RedHat to include this on its own.
Created attachment 142961 [details] A two line patch for pdksh-5.2.14-30.3
do you have vim-common installed ? (rpm -q vim-common)
Yes, vim-common-6.3.046-0.40E.7. Please correct me if I'm wrong but I don't see how this would have any effect since pdksh doesn't use an external vi or vim, it instead uses it's own implementation of vi for command line editing (see vi.c).
I've misread your report and thought you had problems which editing files with vi. vi-mode is exactly behaving as described in the manual page. kill, erase werase, eof, intr and quit work only in insert mode, in edit mode you'll have to use x for delete and X for erase (backspace). I'll add this feature when it has been accepted upstream, though.
Just a small note, in the original report I mentioned that I couldn't backspace using the erase key as defined by stty; here backspace meant to move the cursor from right to left without any character changes. Therefore I think you meant in comment #4 that I'll need to use h or ^H to move the cursor to the left. Thanks, Ron.