In here it's suggested that Vim can do automatic uncompression of gzip/zip files (including other formats) and it's something built-in.

How do I open compressed file then?

Sample scenario:

curl https://html1-f.scribdassets.com/3ltyujem84drr4o/pages/4-e661572124.jsonp | vim -
  • 1
    Add --compressed to curl :-) May 8, 2015 at 20:18
  • @Carpetsmoker Good idea, but actually my original script uses wget to support partially-downloaded files (which curl doesn't), but on the other hand wget doesn't seems to support decompression. I've tested this, but it didn't work for me.
    – kenorb
    May 8, 2015 at 20:21

2 Answers 2


Starting it 2005 vim added support for editing zip files natively. The build in support uses native zip utilities (zip, gzip, jar, xpi, etc) to manipulate these files. It does not look as if there is a direct way to interact with a compressed stream of data unless you use external tools.

vim <zipfile>

should open a buffer listing all files in the zip file. Move the cursor over and press Enter and the file is opened in a buffer. Currently there is no support to add new files to a zip.

For more information see :h zip


Using external Unix tools is easy:

:%!gzip -d
:%!gunzip -d

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.