fidian/hexmode

Preserve vim's default handling of known binary files (e.g., *.gz, *.zip, etc.)

Opened this issue · 2 comments

Would you please modify hexmode so as to preserve vim's default handling of known binary files (e.g., *.gz, *.zip, etc.)?
Currently I get:

% vim text.txt.gz
Error detected while processing BufRead Autocommands for "*.gz"..function gzip#read:
line 47:
Error: Could not read uncompressed file

and then it opens the gzip'd text.txt with hexmode.

Looks like a re-emergence of #27

I'm terrible at VimScript and vim plugins. The reason this project is on GitHub is to help with updates and collaboration. It would be immensely helpful if anyone would be able to fix this in a pull request or even provide help in analyzing the problem.

My guess is that gzip is flagging the file as binary, though I don't know if there is another flag that can be used to determine if the file is being handled by another plugin. Interestingly, editing *.tar.gz works, while editing *.txt.gz does not.