How can I edit a really big file with vi? e.g.: a 20 GByte log file. Are there any modifications for it to handle this size?
If you're using Vim on a 32-bit system, I don't think there is a way to make it do this. It has a hard file size limit based on the size of a 32-bit integer.
If you can do your editing on a 64-bit system, Vim's file size limit becomes something in the exabytes range.
Vim also has an arbitrary lower limit, over which it will page chunks of the file into RAM from its swap file. On the 64-bit CentOS 5.x system I'm currently using, the Vim default for this is approximately 3 GB. You can raise the
maxmemtot limits in order to avoid swapping, if you have enough real RAM to load the entire file. If you do not, you'll end up using the OS's general-purpose swap space instead, which probably won't be any faster. To be clear, you do not need to raise this limit. It just allows Vim to use more real RAM, if you have it.
If you mean some other implementation of vi, please say which. File size limits are one of the areas where vi implementations differ.