I got a problem with vi, i was trying to insert a line very long line and vi doesn’t accept it why, is there any variable that can increase the length of the line?
According to the manpage, the maximum length of a line in vi is defined by LINE_MAX. It appears to be a compiled-in constant, so I don't believe you can change it. (I tried setting it as an env var, and also as a vi var, no luck).
Maximum Line Length
LINE_MAX characters (defined in <limits.h>), including 2-3 bytes for overhead. Thus, if the value specified for LINE_MAX is 2048, a line length up to 2044 characters should cause no problem.
If you load a file that contain lines longer than the specified limit, the lines are truncated to the stated maximum length. Saving the file will write the truncated version over the original file, thus overwriting the original lines completely.
Attempting to create lines longer than the allowable maximum for the editor produces a line too long error message.
Maximum File Size
The maximum file length of 234,239 lines is silently enforced
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.