1825061 Members
5479 Online
109679 Solutions
New Discussion юеВ

Re: VI Help

 
Shannon_1
Occasional Advisor

VI Help

I am trying to edit a file using VI and having a problem. When I use the arrow keys or letter keys(HJKL) to move the cursor in the file, other characters are inserted in the place of the characters I move the cursor over.
10 REPLIES 10
Roger Baptiste
Honored Contributor

Re: VI Help

hi,

Your TERM setting is not correct. before you do vi,
set the term as:

TERM=vt100
export TERM
vi

It should work fine.

HTH
raj
Take it easy.
Craig Rants
Honored Contributor

Re: VI Help

Type in the env command, what is your VISUAL and TERM type. They may need to be changed.

Good Luck,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Sanjay_6
Honored Contributor

Re: VI Help

Hi,

the problem is with your termcap entry. How are you logging into the system.

Try vt100, vt220, hpterm for examples.

use this command to export the term once you are logged in,

export TERM=vt220

If your cursor keys work with one of these or some other termcap entry, you can add this command to your .profile file which is there in your home directory.

Hope this helps.

Regds
melvyn burnard
Honored Contributor

Re: VI Help

another trick I use is:

eval `ttytype -s`
tset


this interrogates the terminal and sets it up for the correct (hopefully ) terminal.
You may also want to check for the existence of a .exrc file in your home directory whiich may contain some settings to override the defaults.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Shannon_1
Occasional Advisor

Re: VI Help

I checked my TERM type. It is correct. To be more specific.....it is only my L key and right arrow key causing the problem. Also, when I open a file the first couple of lines are not available for editing. ???? Thanks for any advice.
harry d brown jr
Honored Contributor

Re: VI Help

Shannon,

In your $HOME directory and in the directory you are currently in: Is there a file called .exrc?

live free or die
harry
Live Free or Die
Rodney Hills
Honored Contributor

Re: VI Help

You did not indicate the type of terminal or terminal emulator you are using. If you use the "telnet" command under Windoze, it does not behave well as a true VT100 terminal.

Also, you mentioned using the right arrow. VI under hpux generally doesn't use the arrow keys (they send an escape code). Only use HJKL for cursor movement.

-- Rod Hills
There be dragons...
Deepak Extross
Honored Contributor

Re: VI Help

Sounds like a configuration problem with your terminal emulator.

Try a different one - maybe wyse50 or wyse60, if your terminal emulator supports it.

Frank Slootweg
Honored Contributor

Re: VI Help

Please tell us which terminal (emulator) you are using, to which mode (i.e. VTXX, etc.) the *terminal* (emulator) is set and to what the TERM variable is set.

It is a wild guess, but this sounds like the (in)famous (MS) Windows "Telnet" emulator problem(s).
Jairo Campana
Trusted Contributor

Re: VI Help

connect from reflection X with HOST DIGITAL -UNIX configured the terminal and proves
other option :download the puty is free(client telnet and ssh)
-connect the server
-edit the file
- go terminal option and selection:
check
Auto wrap mode initially on

use font in both ANSI and OEM modes

in option telnet
terminal-type string: xterm

bye, Jairo

legionx