1

We have both Solaris and Linux environments at work. We use tcsh as the standard shell for hundreds of users. My question is about vi-mode in tcsh:

In Solaris, while I'm typing, I can backspace over previous chars, and then just start typing again. Insert mode is intuitive, and the commandline seems to be in insert mode automatically -- I can backspace, and type, backspace and type, all as if I pressed ESC-i to enter insert mode explicitly (doing that BTW presents the same behavior as not doing it...)

In Linux however, using a slightly newer version of tcsh (6.17), as soon as I press backspace to backup over incorrect text, the editor exits insert mode, and thereafter, I have to press "i" to get back to inserting text. Further, before backspace will erase the char to the left of the cursor, you have to press it twice -- it's switching mode apparently. Then you have to press "i" to enter back to insert mode before you can start typing again, and so on and so on. I find this Linux behavior really annoying and tedious. What is possibly the reason for this difference in behavior?

BTW, my terminal in both cases is xterm.

thanks...

  • Answer: Either a bug or a difference in implementation between the two platforms assumming you are using IDENTICAL .cshrc/.tcshrc files. – mdpc May 27 '14 at 17:32
0

Type

stty -a

and look at the character after the word "erase". Sun has AT&T heritage and uses ^H (ASCII 8) to erase, while the tcsh has DEC/Berkeley heritage and uses ^? (ASCII 127).

You need to place a line like:

stty erase ^H

or

stty erase ^?

in your login file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.