Number of lines in vi

Is there a limit on the number of lines that can be copied into vi editor from another file? When I copy some data items from a file into the vi, I see a limit of 1780 lines can be pasted. After that there seems to be a limit.
How can this be increased?
As an example:, I open an excel file which has about 5000 records, which I am copying and pasting into a file, using vi editor. I then find that only 1780 records are getting copied. After that, it is not getting pasted. Is there a limitation in vi? Or can this be increased?

ex, vi, vim, elvis ? Depending on your OS and the fact that vi started out as ex .

W cannot help much until you let us know a little more about your system. And the limit is the size of the file, so something else is going on here if you think it is line limited.

FWIW - ex sets the limit:
For source code, start here with illumos-gate:
GitHub - illumos/illumos-gate: Community developed and maintained version of the OS/Net consolidation
/usr/src/cmd/vi/port/ex_temp.h
/usr/src/cmd/vi/port/ex_temp.c

On second thought - try using vim instead. vi has line size limits that vim does not have, for example.
The user interface is pretty much identical to vi. The config files are a little different from vi.

I am assuming you are not on HP-UX, but are on Linux.

1 Like

Could that be due to the size of the (internal) paste buffer size?