If vim suddenly won't display help…

I was getting this strange message when attempting to invoke vim help:

Sorry, help file “/usr/share/vim/vim64/doc/help.txt.gz” not found

What was strange is that path did not exist even. I was about to file a bug when I checked my $HOME/.vimrc, and lo and behold this little gem was in it:

” Debian uses compressed helpfiles. We must inform vim that the main
” helpfiles is compressed. Other helpfiles are stated in the tags-file.
set helpfile=$VIMRUNTIME/doc/help.txt.gz

Commenting out that last line fixed the problem.

Oh, and if you want to reformat a text document where the lines are too long:
:set textwidth=60 (or some other reasonable number)
Then highlight the text in question, and hit 'g' then 'q'.

Leave a Reply