Vi editor not working

Hi All,

When i try to use vi editor to view content of a file i get error "Terminal too wide"

I try to use the following stty command though i dont know the purpose of it ( as it was said in some oracle forum )
but still the same error returns.

"stty columns 120"

Could you explain me the purpose of 'stty' command and guide me to fix this vi editor issue.

Operating system used -- Sun solris 5.10

Thanks,
Maddy

vi has always followed my terminal size, so I doubt a bit .. unless you had it configured for a certain size or terminal type and you are using something else� look if you have a .exrc in your home directory and if so what is its content?

What happens when you run

 /usr/openwin/bin/resize

This happens to me all the time on Solaris. I physically resize my window to make it smaller and then retry the vi command. It always works with the second try with the smaller window. It might be possible to get to run in a too-large window by artifically ignoring the surplus columns but that would lead to weird editing experience.

Maybe you can use vim ?
If not yet in /opt/csw/bin/ you can easily compile the vim sources.
It is really a "vi improved"!

What he said. Just re-size the window.