Operating System - HP-UX
1748179 Members
4071 Online
108758 Solutions
New Discussion юеВ

Re: vi screen isn't enough

 
???_185
Regular Advisor

vi screen isn't enough

when I opened /etc/rc.config.d/netconf, the article started from the middle of the screen.
to see article from the 1 line, what can I do ?
9 REPLIES 9
Micky_1
Advisor

Re: vi screen isn't enough

hi,

you are using a bad terminalemulation.

try:
export TERM=vt100
reset

then the screen should clear and the cursor/prompt should be on the top-left-corner.

for TERM you may also use vt220, linux...etc...
it depend's on the console/terminal/emulation you're using

Micky
RAC_1
Honored Contributor

Re: vi screen isn't enough

ttytype -s

what are your terminal settings. change accordingly.
There is no substitute to HARDWORK
Devender Khatana
Honored Contributor

Re: vi screen isn't enough

Hi,

Check wheather you TERM varialbe is set properly? What is this set to and what is its type ?

#echo $TERM (Current value)
Try chaning it to mre appropriate value compatible with your hardware terminal type.

HTH,
Devender
Impossible itself mentions "I m possible"
Stephen Keane
Honored Contributor

Re: vi screen isn't enough

Try

# eval `ttytype -s -a`

and see if vi works then.
Bill Hassell
Honored Contributor

Re: vi screen isn't enough

Since there are hundreds of terminal (and now with PCs, terminal emulators), you must match your terminal to the valuer of $TERM in your login environment. For instance, if you are using an HP tterminal or terminal emulator like QCTerm, Reflection/1 or Reflection/HP but someone has hardcoded TERM=vt100 in your environment (a bad idea), then vi will send meaningless image controls to your screen.

So rather than changingt the TERM value every time you login with a different terminal, let ttytype set it for you. Edit your .profile and add this near the top:

eval $(ttytype -s)

Now your TERM variable will be set correctly each time you login. NOTE: If you are on the console (LAN console, serial console, Web console) for a computer with a GSP, ttytype is trashed by an override from the GSP. In that case, your TERM value (and therefore the type of terminal emulator) is restricted. ARe you using the console or logging over the network?


Bill Hassell, sysadmin
Juan M Leon
Trusted Contributor

Re: vi screen isn't enough

Hello Zungwon, I think you can use a resize command. If I am not mistaken your LINES and COLUMS variables are not using the full screen.

I hope it helps.

???_185
Regular Advisor

Re: vi screen isn't enough

other terminal, it is nortal.
resize
COLUMNS=80;
LINES=24;
export COLUMNS LINES;
but, by putty terminal, if I exwcute vi terminal, it is started from the middle.
isn't it stranged?
Bill Hassell
Honored Contributor

Re: vi screen isn't enough

As mentioned before, it is not the LINES and COLUMNS that are causing your problem, it is the value of TERM. What happens when you do this:

echo $TERM
eval $(ttytype -s)
echo $TERM
vi /etc/rc.config.d/netconf


Bill Hassell, sysadmin
claudio_22
Regular Advisor

Re: vi screen isn't enough

Hello ,

I've same problem on two box , with hp-ux 11i . On one , problem arise just I installed GOLDQPK11i Jun 2005 .

I've tried above commands without success.

Thanks for any help