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 filename and content type:
- 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.
- Images, with selection, copying, zoom, pan, rotation, flips, and metadata.
- Audio and video, using native playback controls.
- PDF, with page navigation and zoom controls.
Press F3 inside the viewer to switch between the automatically selected mode and hex. Text and hex modes use Mod + F to search and Mod + G to go to a line or hexadecimal offset. Press Escape to clear a selection, close an open search bar, or close the viewer.
Viewer commands are listed under Viewer in the Keybindings tab. They can be rebound, and tooltips and context menus show the resolved shortcuts. A command only runs in modes that support it; for example, image and PDF modes share the zoom commands.
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; double-click toggles between those views. At 100%, one image pixel maps to one physical display pixel, including on HiDPI screens.
Drag with the left button to select a rectangular image region. Press Mod + C to copy the selected region as PNG, or the whole image when there is no selection. Rotation and flips are included in the copied result. Press Mod + A to select the whole image and Escape to clear a selection.
Pan with the middle button, Shift or Alt plus a left-button drag, or the arrow keys. Press R to rotate clockwise, Shift + R to rotate counter-clockwise, and H/V to flip. These transforms affect the view and copied image but do not modify the file.
Press B to cycle the transparency checkerboard, dark, and light
backgrounds. This choice is saved in the viewer.image_background setting.
Press I for dimensions, megapixels, MIME type, file size, and
available EXIF camera details. EXIF is read through the current filesystem,
including remote and archive files, from the first 4 MiB; files with no EXIF
there show No EXIF metadata.
PDF mode uses the same =, -, and 0 zoom commands.
Remote content is streamed and range-read where the source supports it. Opening a large ISO file from S3 in the viewer does not imply downloading the whole image.
Editor
Section titled “Editor”Press F4 to edit the focused text file in a separate Monaco-based window. Language mode is detected from the filename, extension, and content type, 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/dark themes. Files larger than 5 MiB are rejected rather than loaded into the editor.
Press Mod + S to save. Editor: Save appears in the Keybindings tab and can be rebound. Writes are atomic where supported. The window title marks unsaved changes, and closing a dirty editor asks before discarding them. Escape first dismisses editor completions, search, palettes, or selections; an unclaimed Escape closes the editor.
Use Shift + F4 from a pane to create a new file and begin editing it immediately.