Setting the backspace key function

Vi Back space does not work ??

Setting the Backspace Key

For the backspace key, it isn’t quite as easy. The problem here is that there are two common backspace codes: backspace and delete. One is ^H, the other is ^?. If you are having problems it is because your terminal program choose the one the system didn’t. The default cluster login scripts set it to ^H. One solution is to change the setting in the local terminal emulator. However there are many possible emulators and we can’t support them all. So, to fix this on the UNIX side, you have to type the following at the shell prompt:

stty erase ^v<press backspace key right after typing ^v>

The ^v (control – v ) is the “quote character.” It keeps the shell from interpreting the next keystroke. This is necessary because some shells are smart enough to realize that either ^H or ^? should be treated as the backspace character, but some programs don’t (like mail, vi…).

If the problem persists try one of the following:

put the following lines into your .vimrc or type them in the vi commnad mode

set nocompatible bs=2

set backspace=start,eol,indent

set backspace=2

How to set the tab spacing in vi

set tabstop=x

x is the number of spaces that tab should introduce

How to highlight multiple words in VIM:

The above link provides an excellent way to highlight multiple words in vim. It is easy to setup, use and to extend the functionality provided.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s