2

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 -
Vivian De Smedt
  • 16,336
  • 3
  • 18
  • 37
kenorb
  • 18,433
  • 18
  • 72
  • 134

2 Answers2

5

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

jecxjo
  • 2,660
  • 13
  • 24
  • if you're using bash: vim <(curl https://html1-f.scribdassets.com/3ltyujem84drr4o/pages/4-e661572124.jsonp) – JRG Mar 22 '17 at 17:45
2

Using external Unix tools is easy:

:%!gzip -d
:%!gunzip -d
kenorb
  • 18,433
  • 18
  • 72
  • 134