Tuesday, September 26, 2006

stty erase

RE: vi question on OSX: "Try this shell command:


stty erase


The Backspace key should now work on the command line and in vi. If you
want to make this fix permanent, you'll need to add it to your .cshrc
file (or appropriate file for whatever shell you are using; .cshrc is
for the default tcsh shell). The trick, of course, is that if you have
already fixed the problem in your shell, entering the same command while
editing your .cshrc file becomes more difficult--you don't get the ^?
anymore, it just backspaces. You can get around this by hitting
Control-v and then the Backspace key. So while editing a new line in
.cshrc, type the following:


stty erase ^v


And you should see:


stty erase ^?


The save, quit, and open a new shell to confirm that this worked.Try this shell command:


stty erase


The Backspace key should now work on the command line and in vi. If you
want to make this fix permanent, you'll need to add it to your .cshrc
file (or appropriate file for whatever shell you are using; .cshrc is
for the default tcsh shell). The trick, of course, is that if you have
already fixed the problem in your shell, entering the same command while
editing your .cshrc file becomes more difficult--you don't get the ^?
anymore, it just backspaces. You can get around this by hitting
Control-v and then the Backspace key. So while editing a new line in
.cshrc, type the following:


stty erase ^v


And you should see:


stty erase ^?


The save, quit, and open a new shell to confi"

0 Comments:

Post a Comment

<< Home