VI editor shows the error Terminal too wide within Solaris

Terminal too wide

You may receive the following error when using VI editor within Solaris. I got this error when I was adding tns entry in tnsnames.ora file.

$ vi tnsnames.ora

Terminal too wide

Here, Vi will not allow to edit files. For editing you must increase the number of columns as shown below.

To resolve this increase the number of columns using below command:

stty columns 120