File Viewer
View files with syntax highlighting, auto-refresh, and PDF rendering — perfect for monitoring logs and reviewing code without leaving the browser.
Opening Files
Open a file in the viewer from the File Browser (click any file) or from a terminal:
# Open a file in the viewer tile
suwu open /path/to/file.txt
# Open and watch for changes
suwu open --watch /var/log/syslog
Supported Formats
- Source code — syntax highlighting for 100+ languages (Go, Python, JavaScript, Rust, etc.).
- Plain text — log files, config files, markdown.
- PDF — rendered in-browser with page navigation.
- Images — PNG, JPG, GIF, SVG, WebP displayed inline.
- Binary files — hex view with ASCII sidebar.
Auto-Refresh
When opened with --watch, the viewer polls for changes and updates the display automatically. This is ideal for:
- Monitoring log files during a build.
- Watching config files that change on reload.
- Tracking output from background processes.
Tip
Open a log file in watch mode in one tile while running your build in another — you'll see new lines appear in real time.
Navigation
- Scroll with the mouse wheel or keyboard.
- Search with Ctrl+F — matches are highlighted in the gutter.
- Jump to line with Ctrl+G.
- Copy selected text with Ctrl+C.
PDF Viewer
PDF files render with full pagination. Use the toolbar to navigate pages, zoom in/out, and download the original file.
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Search | Ctrl+F |
| Jump to line | Ctrl+G |
| Refresh file | Ctrl+R |
| Toggle wrap | Alt+Z |
| Zoom in | Ctrl++ |
| Zoom out | Ctrl+- |