Peter Palm wrote:
http://www.vim.org/scripts/script.php?script_id=1506.

Indeed, among other things, this disables the swap file for
'large' files, which should really speed up things.

I was going to report the following issue to vim-dev after I got
a chance to investigate it a little further, but it seems
appropriate to mention it now.

I did some work with a 3GB text file on Win32, using Vim 7.0 and
Dr.Chip's LargeFile.vim script from Tip 1506 above.

The result was really ugly. The script failed to notice that 3GB
was large because the Vim function getfsize(f) returned a
negative number.

Vim eventually opened the file and was able to search, etc. So
Vim doesn't rely on the code behind getfsize().

I started looking at what could be done to fix the bug, but have
had to leave it for another day. I was starting to think that it
wouldn't be too hard to use the extended functions available in
recent Win32 and Linux to get a 64-bit file size. Then maybe
provide a function to compare a 64-bit file size with a
specified 32-bit limit, so LargeFile.vim could work reliably.

I haven't checked getfsize() on 32-bit Linux yet, nor am I
sufficiently patient to try opening the 3GB file with Vim 7.1.

John

Reply via email to