Viewer and editor
The viewer and editor read through Newt’s filesystem layer. They work with local files, remote sessions, S3, SFTP, archives, disc images, and search results without requiring you to copy the file to a local pane first.
Viewer
Section titled “Viewer”Press F3 to open the focused file. Newt chooses a mode from the file’s associations, then from what its content is:
- Text, with incremental loading, selection, line navigation, literal or regular-expression search.
- Hex, with byte selection, hex or text copying, and searches expressed as text or bytes.
- Structure, a tree of the file’s fields, for executables, archives, captures, databases, and many other binary formats.
- Table, for CSV and TSV files.
- Rendered Markdown, for
.mdand.markdownfiles up to 4 MiB. - Images, with selection, copying, zoom, pan, rotation, flips, and metadata.
- Audio and video, using native playback controls.
- PDF, with page navigation and zoom controls.
Newt identifies a file from its content rather than its extension. For text,
the name still decides the mode: a README.txt that looks like Markdown stays
in Text mode, while an extensionless README written in Markdown renders as
Markdown. For binary content the name is ignored: unrecognized content opens
in hex mode, and formats no other mode shows, such as archives, executables,
and disk images, open in Structure mode.
Image, audio, and video modes use the platform’s web view to decode files, so what they can show differs by platform. Anything they cannot show opens in Structure mode instead:
| Mode | Everywhere | Also |
|---|---|---|
| Image | PNG, APNG, JPEG, GIF, WebP, AVIF, BMP, ICO, SVG | TIFF, HEIC, and JPEG XL on macOS |
| Audio | MP3, AAC/M4A, WAV, FLAC, WebM | AIFF on macOS and Linux; Ogg on Linux and Windows |
| Video | MP4, WebM | QuickTime on macOS; QuickTime, Matroska, and Ogg on Linux |
On Linux, playback also depends on the installed GStreamer plugins.
Press F3 inside the viewer to switch to the mode’s counterpart: usually Structure, or Text for Table, Markdown, and hex. F3 Switches To in Settings can make hex the counterpart instead of Structure, and the window’s View menu can select any mode.
Text, Table, and hex modes use Mod + F to search and Mod + G to go to a line, row, or hexadecimal offset. Escape clears a selection, closes the search bar, or closes the viewer; Mod + W closes the viewer directly. Copying is limited to 10 MB; a larger selection reports an error rather than copying part of it. Viewer commands can be rebound under Viewer in the Keybindings tab.
FIFOs, sockets, and devices are not opened in the viewer or editor.
Remote content is streamed and range-read where the source supports it, so opening a large ISO on S3 does not download the whole image. Files opened from search results open as the source file itself, with its real path in the title.
Quick View
Section titled “Quick View”Press Mod + Shift + F3 to preview the file under the cursor in the right half of the main window. The left half shows the active pane; Tab, or the pane-switch button in the pane’s header, switches which pane is shown. The preview follows the cursor once it comes to rest.
The preview’s bar has the viewer’s mode, encoding, and table menus, an open button that shows the file in a full viewer window, and a close button that turns Quick View off.
The keyboard stays with the file list, so the preview does not search or take viewer commands, though you can click into it to scroll or select. The copy shortcut copies what is selected in the preview, and otherwise copies the file as usual. F5 and F6 still use the hidden other pane as the destination.
Text encodings
Section titled “Text encodings”Text, Table, and Markdown modes detect byte-order marks, UTF-8, UTF-16, and common legacy encodings, and the status bar shows the result. Use the Encoding menu to choose another encoding, including Windows and ISO-8859 code pages and common Japanese, Chinese, and Korean encodings, or to return to Auto-detect. UTF-32 is not supported.
Regular-expression search and hex mode’s text search work on the raw bytes, so non-ASCII search text in them only matches UTF-8 files.
Work with tables
Section titled “Work with tables”CSV and TSV files open as a spreadsheet-style grid that starts displaying
before the whole file is read; the row count carries a + until the end is
reached. The Table menu sets the delimiter (comma, semicolon, tab, or
pipe), whether the first row is a header, and whether quoted fields are
parsed.
The header row and row numbers stay visible while scrolling. Drag a header separator to resize a column, or double-click it to fit the values.
Click or drag to select cells, and Shift to extend a range; column headers, row numbers, and the top-left corner select whole columns, rows, or the table. The arrow keys, Tab/Shift + Tab, and Home/End move the cursor, and Mod plus an arrow or Home/End jumps to an edge.
Press Enter or F2, or double-click a cell, to select text within it; Escape or Enter returns to cell selection.
Mod + C copies the selected cells as tab-separated data for pasting into spreadsheets; Copy as CSV is in the context menu. Copying whole columns includes their headers.
Read Markdown
Section titled “Read Markdown”Markdown mode renders tables, task lists, strikethrough, autolinks, and footnotes and follows Newt’s theme. Files larger than 4 MiB open as text instead. Press F3 to see the source in Text mode.
Relative links open in the same viewer window, and in-document links scroll within it. Web and email links open in the system browser; other URL schemes do nothing. Relative images load through Newt’s filesystem layer, including in remote sessions and archives, but external images are not fetched, so badges and tracking pixels do not contact remote servers.
Raw HTML is limited to basic text, list, table, and heading elements and
<details>. Scripts, styles, frames, embedded objects, forms, and inline
styles or event handlers are removed.
Explore a file’s structure
Section titled “Explore a file’s structure”Structure mode takes a file apart into a tree of its fields: an executable’s headers, sections, and imports, an archive’s members, an image’s chunks, a database’s pages, or a packet capture’s frames down to their TCP headers. It recognizes some 1,600 formats, and dissects embedded and compressed content in turn, such as a PNG inside a ZIP inside an installer.
Depth varies by format: common formats are dissected field by field, while for many obscure ones Newt only decodes the header. The dissection may be incomplete or wrong, so do not rely on it for forensics or anything else that needs an exact account of a file’s contents.
The tree shows each field’s name, value, summary, any problems, and offset. The right side shows the selected field’s bytes highlighted and its details below, such as other radixes, flag tables, and whether a checksum matches. Mod + B or the Bytes button hides and shows the bytes.
Only what you expand is read, so a large file on S3, in an archive, or in a remote session transfers only the bytes you look at. Long lists load 200 entries at a time. The status bar shows progress for a loading field with a Stop button, and Escape stops everything in flight.
| Key | Action |
|---|---|
| Arrow keys | Move through and expand fields |
| Enter / Space | Toggle a field |
| Tab | Move between the tree and the bytes |
| Mod + G | Select the field at a hexadecimal offset |
| Mod + Enter | Follow a field that points elsewhere in the file |
| / | Filter the expanded tree with a regular expression |
| Mod + C | Copy the field’s name, value, and summary |
| Mod + Shift + C | Copy only the value |
| Mod + S | Save the field’s or selected bytes to a local file |
| Mod + D | Choose the format manually |
Clicking a byte selects the innermost field that holds it. The filter does not search collapsed fields. The context menu adds Copy Tree and Copy Bytes as hex, text, or Base64. Saving bytes always writes to this computer, even in a remote session.
When content is encrypted, such as an encrypted archive’s entries, a bar asks for the password; Escape skips it. Passwords are kept only while the viewer has the file open and are never stored.
If Newt does not recognize the file or picks the wrong format, press Mod + D to choose one from a searchable list. Select an archive member or other embedded file first to choose a format for it instead. Identify automatically returns to the detected format. Quick View does not ask for passwords, choose formats, or save bytes; open the file with F3 for those.
Work with images
Section titled “Work with images”Images open fitted to the window. Use the mouse wheel, a macOS trackpad pinch, or =/- to zoom. Press 0 to fit or 1 for actual size, where one image pixel maps to one display pixel; double-click toggles between the two. PDF mode uses the same =, -, and 0 keys.
| Key | Action |
|---|---|
| Arrow keys, middle drag, or Shift/Alt + drag | Pan |
| Left drag | Select a region |
| Mod + C | Copy the selection, or the whole image, as PNG |
| Mod + A / Escape | Select all / clear the selection |
| R / Shift + R | Rotate clockwise / counter-clockwise |
| H / V | Flip horizontally / vertically |
| B | Cycle the background: checkerboard, light, dark |
| I | Show dimensions, file details, and EXIF camera data |
Rotation and flips apply to the view and copied image but do not modify the file.
Editor
Section titled “Editor”Press F4 to edit the focused text file in a separate Monaco-based window. Language mode comes from the file’s associations, then from the type Newt identifies from its content, and can be changed from the Language menu.
The editor provides syntax highlighting, line numbers, find and replace, undo and redo, optional word wrap, and light and dark themes that follow Newt’s theme. Files larger than 5 MiB cannot be opened in the editor.
Find and replace and undo and redo use the editor’s own keys, which cannot be rebound:
| Action | Linux and Windows | macOS |
|---|---|---|
| Find | Ctrl + F | Command + F |
| Replace | Ctrl + H | Command + Option + F |
| Undo | Ctrl + Z | Command + Z |
| Redo | Ctrl + Y | Command + Shift + Z |
Press Mod + S to save; Editor: Save can be rebound in the Keybindings tab. Writes are atomic where supported. The window title marks unsaved changes, and closing a dirty editor asks before discarding them. Mod + W closes the editor, as does Escape once nothing else (completions, search, a selection) is using it.
The editor saves text as UTF-8 and keeps a byte-order mark if the file has one. A file that is not valid UTF-8 opens read-only, marked Read-only: not UTF-8, because saving it would replace the bytes that did not decode.
Use Shift + F4 from a pane to create a new file and begin editing it immediately.