Compress Vim doc files to save space
From Vim Tips Wiki
created July 20, 2001 · complexity intermediate · author Francis · version 6.0
As everyone knows, the $VIMRUNTIME/doc is increasing rapidly in size. The directory contained so many plain-text documents that I often compress them to save my diskspace. With the support of VIM's GZIP plugin, VIM will automatically uncompress the files when we need to read them.
Here is my procedure:
1. If you have the source, go to 'runtime/doc' and edit 'doctags.c', change printf("%s\t%s\t/*", p1, argv); to printf("%s\t%s.gz\t/*", p1, argv); then make. This is to modify the tag, or you'll have to change the 'tags' file by hand if you don't have doctags.c.
2. Edit the new generated 'tags' file to rename 'help.txt.gz' back to 'help.txt' because it's hard-written in VIM executable binary.
3. Copy the new 'tags' to $VIMRNUTIME/doc and run 'gzip *.txt; gunzip help.txt'
On Vim 6.0, we can reduce the original size (3302k) to 1326k.
It is possible to compress help.txt, too. there is a 'helpfile' option in vim: