VSCode Zip Viewer
An extension which allows for the manipulation of zip files in VS Code.
Learn how it works with a video (click below)
If this extension has helped you at all, please consider leaving a review on the marketplace and/or starring the repository on GitHub.
Installation
Install from the VSCode Extension panel.
Search adamraichu.zip-viewer
.
Usage (Regular Zip Compression)
Supported File Types
All functions for this extension are designed to support the following built-in list.
If you know of another alias for zip files, please open an issue here.
.aia
.appxbundle
.c4z
.crx
.ear
.epub
.ipa
.jar
.lpkg
.mcaddon
.mcpack
.mcproject
.mctemplate
.mcworld
.mrpack
.nba
.nupkg
.pbit
.pbix
.sb2
.sb3
.vsix
.war
.xlsx
.xpi
- and of course,
.zip
Viewing Zip File Contents (Custom Editor)
The editor will display a list of the files inside the zip being previewed.
Next to each file name is a Get Preview
button.
Clicking on this button will, if available for the file type, display the contents below.
If the type is not available to the preset list, the extension will show an error message.
You tell the extension that the file you would like to preview is a text file.
If you do so, it will preview it as if it were a text file.
Selecting this option will generate another prompt, asking if you would like to always open this file as a text file.
Selecting "Yes" will update settings.json
in the .vscode
folder of the workspace.
If you would like to open a zip file with a file extension that does not match the built in list, use the command Zip Tools: Open a zip file with the custom editor
.
The extension will prompt you to choose a file.
The file you select will be opened with the zip file editor.
Next to each file name there is a checkbox.
At the top of the editor is a button labeled Extract Selected Files Only
.
When you click that button, the extension will prompt you to select a Target Folder.
The extension will then extract the selected files to that location.
Creating a Zip
To create a zip file, run the command Zip Tools: Create a zip file from folder
.
The extension will prompt you to select a folder to copy & compress.
The zip file's name will be of the pattern <folderToCompressName>.zip
.
The zip file will be created in the same folder as the folder you zipped.
Alternatively, you can right click a folder in the Explorer menu, and select the command name in the context menu.
Important: Each file read when creating a zip file applies to your api rate limit, so it is not recommended to zip large folders using this extension.
Exceeding the API limit will cause the process to fail, so consider downloading the folder and zipping locally on your device.
To extract a zip file, run the command Zip Tools: Extract (unzip) a zip file from workspace
.
The extension will prompt you to select a zip file, then it will prompt you to choose a target folder.
The contents of the zip file will be deposited in that folder.
The new folder's name will be <zipFileName><zipViewer.unzippedSuffix>
.
(Deprecated) ~~The extension contributes a setting zipViewer.zipTypes
. If the file you chose does not end with a string in that array, the extension will give an error message.You can edit this setting in the settings editor. This setting is ignored if zipViewer.picky
is set to false.~~
Usage (GNU Zip Compression)
The extension now contributes a custom "editor" for files compressed with GNU Zip (gzip) compression.
When you open a file with one of the following file extensions, the extension will decompress the file, and write a new file to the workspace.
Here is an example demonstrating the naming convention.
You open a file called smile.svg.svgz
.
The extension decompresses it, and creates a file called smile<unzippedSuffix>.svg
.
You can disable this editor by setting zipViewer.gzipEditorEnabled
to false.
You can compress a file by right clicking it in the explorer menu, or running the command Zip Tools: Compress file with GZip compression.
Supported File Types (gzip)
.gz
.gzip
.svgz
.emz
.tg
.tgz
Known Issues
You can view issues here.
Changelog
You can view the changelog here.
See Also
If you found this extension useful, you may also want to check out PDF Viewer, Font Preview, or Docx Renderer.