|Summary:||Can't backspace in vim in console mode|
|Product:||[Retired] Red Hat Linux||Reporter:||Stephen Rasku <redhat>|
|Component:||vim||Assignee:||Michael K. Johnson <johnsonm>|
|Status:||CLOSED RAWHIDE||QA Contact:|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2000-02-15 17:24:19 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Cloudforms Team:||---||Target Upstream Version:|
Description Stephen Rasku 1999-10-22 04:34:35 UTC
I can't backspace in vim in console mode (i.e. non-X mode). When I type backspace I get ^? displayed. This problem occurs for both vim-enhanced-5.3-7 and vim-enhanced-5.4.2. Interestingly, I don't have this problem inside KDE either running vim or gvim.
Comment 1 erik 1999-10-25 23:59:59 UTC
I think this is because: The termcap and terminfo databases disagree on how to delete to the left on the linux console. Termcap says # * WARNING: * # * Some Linuxes come with a default keyboard mapping that makes kbs=^? and * # * all have kcbt=^I. Apply `loadkeys -d' to change this if necessary, and * # * bug your Linux distributor to get it right in the next release. Here * # * are the keymap replacement lines that will fix the problem: * # * * # keycode 14 = BackSpace BackSpace # alt keycode 14 = Meta_BackSpace # keycode 15 = Tab Tab # alt keycode 15 = Meta_Tab # shift keycode 15 = F26 # string F26 ="\033[Z" and kb=^H and kD=\E[3~ This is termcap-9.12.6-15 terminfo has kbs=\177 and kdch1=\E[3~ I have a patch that fixes the console keymaps to give BackSpace (^H) with the unshifted backspace key and Delete (^?) with the Control key for all languages. No need to change Russian, they were already set up that way. This would match the termcap entry. Alternatively, the termcap entry could be changed to match the terminfo entry (^?). The disadvantage of this is that xterm has a strong tendency to produce ^? for the Delete keysym (bottom left on the six-key block above the cursor keys). You would want that (^?) to delete the letter under the cursor in readline apps like bash. You can achieve that by adding DEL: delete-char to /etc/inputrc, but then things will go wrong in the console. Therefore I favour fixing things so ^H is used on the console. This has the added advantage that on the console the backspace and delete keys are mapped in such a way that XFree automatically gives them the correct BackSpace and Delete keysyms when it reads the console keyboard and sets up the default keymap. That way Motif apps just work. I have a fix to mingetty to get it to issue the required stty so things work on the console. The present situation with backspace and delete is not very satisfactory. On a standard install, under the console and xterm, none of the readline apps, including bash, are capable of deleting the character under the cursor when the user presses the Delete key. They either don't work, or delete in the wrong direction. This is related to bug 6358
Comment 2 Preston Brown 2000-02-15 17:24:59 UTC
fixed for 6.2 and later.
Comment 3 Stephen Rasku 2000-04-27 06:56:59 UTC
What RPM(s) do I need to install to fix this bug for RH 6.0?