Bug#459399: [vim] does not see large files and overwrites them as new

James Vega jamessan at debian.org
Tue May 27 12:12:43 UTC 2008

On Sat, May 24, 2008 at 01:04:42PM +0200, Frederik Schwarzer wrote:
> Here a 4.7GB file filled with zeros doesn't load.

Vim doesn't handle files with very long lines well.  In my test, I
created the large files with 100 characters per line.

> For me it still feels weird that vim claims the file being a
> [New File] while loading, that one can work at the file as
> if it was a new file and then overwrites it when saving.
> I think there is some notification missing. Or editing could
> be disabled while loading.
> Anyway, here's exactly what I am doing.
> $ dd if=/dev/zero of=test.txt bs=1000000 count=5000
> ...
> $ vim test.txt
> ~
> ~
> ~
> "test.txt" [New File]
> Here I waited up to 45 minutes without having any noticable
> hdd or cpu activity.

I get "E342: Out of memory!" and an empty read-only buffer.

When I open a large file with many lines instead of one long line, I'm
able to modify and save the file.  It took some experimentation to
actually get a large file size I could work with.  The initial 5GB file
I tried gave me an error about being unable to create the swapfile since
I didn't have enough free space to also create a 5GB swapfile.  In the
end, I was able to work with a 3GB file just fine (aside from the long
delays for loading and writing out the file).

GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20080527/a03eabdd/attachment.pgp 

More information about the pkg-vim-maintainers mailing list