hexmode icon indicating copy to clipboard operation
hexmode copied to clipboard

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

Open theopathic opened this issue 4 years ago • 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.

theopathic avatar Apr 06 '21 21:04 theopathic

Looks like a re-emergence of #27

mjsir911 avatar Apr 06 '21 22:04 mjsir911

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.

fidian avatar Apr 07 '21 14:04 fidian