vi : Line too Long Error

Hi !

I am woking on Solaris 5.10 and face a problem sometimes when i try to open files in the vi editor .

Sometime when the file is big i am not able to view the file in vi and i get the error like

I guess vi have some line size setting and if the lines are ,longer than that particular size , it give the error of "Line too long" .

Can anyone provide some information or help by which we can change this setting and can view even longer filew by vi editor ?

unix vi editor

You can try "vim". It does not have this limit and a lot of other improvements over the classic "vi". You can download Packages for Solaris from sunfreeware.com.

Hi
File size?

  • Did you try split file ?
  • or use fold line lenght decrease
  • or use vi read only mode with -R
  • or more or less
  • or vim update

Solaris' vi seems to be limited to lines up to 4095 characters. If only a single line of a file is longer than this limit, vi can't read the file. The readonly option does not help in this case either. If the total size of the file is too big, you get a "Tmp file too large" error.