Does anyone know what the maximum line length is in Vi? I
was trying to edit my .newsrc file, when I noticed that the
buffer stopped at a certain group high up in the file,
after which there were ~'s to indicate end of file. The Vi
manpage mentions nothing about limitations (SunOS 4.1). I
found the following in the ed(1) manpage:
> LIMITATIONS
> The following limitations apply:
>
> 512 characters per line.
> 256 characters per global command-list.
> 1024 characters per filename.
>
> The limit on the number of lines depends on the amount
> of user memory: each line takes 1 word.
Do these restrictions hold for Vi, as well?
PS: I did manage to edit the file in Emacs, and could view it
using more or less. I haven't tried Vim yet.
--
George Ioannou
gi...@cam.ac.uk
>Does anyone know what the maximum line length is in Vi?
1024 characters. That is, 1023 characters plus a newline.
>I was trying to edit my .newsrc file, when I noticed that the
>buffer stopped at a certain group high up in the file,
>after which there were ~'s to indicate end of file.
You should get a message at the bottom of the screen reading:
".newsrc" Line too long
When that happens, vi does not try to read the rest of the file.
If you type control-G in that situation, you get something like
".newsrc [Not edited] line 42 of 42 --100%--
If you edit the file anyway, the message changes to
".newsrc [Not edited] [Modified] line 42 of 42 --100%--
If you then try to exit using ZZ, you get a message
".newsrc" File exists - use "w! .newsrc" to overwrite
>The Vi manpage mentions nothing about limitations (SunOS 4.1). I
>found the following in the ed(1) manpage:
>> LIMITATIONS
>> The following limitations apply:
>> 512 characters per line.
>> 256 characters per global command-list.
>> 1024 characters per filename.
>> The limit on the number of lines depends on the amount
>> of user memory: each line takes 1 word.
>Do these restrictions hold for Vi, as well?
In vi, it seems to be:
1024 characters per line
128 characters per global command-list.
1024 characters per filename.
There is no hard limit on the number of lines, but vi keeps its edit
buffer in a disk file. If you try to edit too much, the disk gets full.
--
Hope this helps,
HansM
1000 characters [?]
-Jeff.
ed
Vim
Vile
They all worked fine with lines over 2000 characters in length, but I
don't know the exact limit.
--
George Ioannou
gi...@cam.ac.uk
lines on vile, at least, are limited by the size of an int.
anyone know what it is in vim?
paul
---------------------------------
paul fox, p...@foxharp.boston.ma.us (arlington, ma)