StudioZip:Preview

From MutigerAffe Wiki
Jump to navigation Jump to search

The right pane of the Studio ZIP tab shows the file you selected in the tree. The header above it shows the path of the file inside the archive.

What is shown

Studio ZIP decides in this order:

File How it is detected Shown as
Image File extension .png, .jpg, .jpeg, .gif, .webp, .bmp, .ico, .svg or .avif The image
PDF Extension .pdf, or the file starts with %PDF- PDF viewer, see below
Text Valid UTF-8 and no zero bytes in the first 8 KB Read-only text editor, see below
Anything else Binary file · <size>

The preview never changes the archive. To edit a file, use Open in editor. See Editing Archives.

Text files

Text is shown in Monaco, the editor engine that VS Code itself uses, bundled into the extension. The editor in the preview is read-only.

  • Syntax highlighting, chosen from the file extension or name (for example .java, .json, .py, Dockerfile, MANIFEST.MF). Unknown types are shown as plain text.
  • Code folding, the find widget (Ctrl+F) and a minimap.
  • Light or dark colors to match the current VS Code theme. The colors change when you switch the theme.

There is no IntelliSense, no error checking and no link detection in the preview. Open the file in an editor tab to get the language features of VS Code.

Images

Images are shown at their own size. Images wider than the pane are scaled down to fit its width. Scaled images are not smoothed, so pixel art stays sharp.

PDF files

PDF files are rendered with pdf.js, bundled into the extension. It works offline.

  • A toolbar shows the current page and the zoom level.
  • Zoom out and Zoom in step through 25, 50, 75, 100, 125, 150, 200, 300 and 400 %.
  • Fit width scales the pages to the width of the pane. This is the default. It follows when the pane is resized.
  • Pages are rendered only near the visible area, so long documents stay fast.
  • The text in a PDF cannot be selected.

Large files

Files larger than studioZip.preview.maxFileSizeBytes (default 5 MB) are not loaded automatically. The pane shows a message such as 12.0 MB exceeds the 5.0 MB preview limit. and a Show anyway button. Click it to load the file.

The size check uses the uncompressed size and happens before anything is unpacked. Set the value to 0 to turn the limit off. See Commands and Settings.

Encrypted files

Encrypted files are not previewed. The pane shows This entry is encrypted. To read an encrypted ZIP entry, use Open in editor or Extract…. Studio ZIP then asks for the password. See Encrypted archives.

Errors

If a file cannot be read, the pane shows the error message in place of the preview, for example when the archive is damaged.

Studio ZIP
Start Installation
Features Archive Tab · Preview · Editing Archives · Supported Formats
Reference Commands and Settings · FAQ · Version History
Links Project page on mutigeraffe.com · Download on the VS Code Marketplace