Phials documentation

Text & Code

The text and code preview opens many plain-text and source files directly in Phials, with syntax highlighting, line numbers, and saving without leaving the app. The preview area shows a full editor for the file. What you see is the file itself, not a separate “pretty” rendering. That rendered view is reserved for formats like Markdown, which adds a live rendered view.

Prerequisites

  • A file Phials treats as text or code (for example .txt, .log, .json, .yaml, web files like .html / .css, languages such as .js, .ts, .py, .rs, .go, shell scripts, SQL, and many common config extensions). The app picks a language mode from the file name so highlighting matches the kind of file you opened.

Markdown files (.md, .markdown, .mdc) use the dedicated Markdown preview instead, which pairs editing with a rendered document, so they do not use this text preview.

For how Phials chooses a preview and where it appears in the window, see File previews.

Open the text or code preview

  1. Select the file in your file list or Vial.
  2. The preview loads in the preview sidebar or a preview tab, depending on your layout (see File previews).

Syntax highlighting and language mode

  • Highlighting is based on the file extension and related type detection. A small language label in the toolbar shows the mode Phials is using (for example typescript or json).
  • You get line numbers, matching brackets, and a dark editor theme that matches the rest of the app.
  • Some languages get richer highlighting than others. Very uncommon extensions may fall back to plain text with minimal coloring.

Preview sidebar versus fullscreen

  • Preview sidebar: Compact but fully usable. You can scroll, edit, save, and revert here.
  • Fullscreen: Opens the same editor in a dedicated preview tab with more room, a clearer header showing file name and language, and the same save actions. Use the fullscreen icon in the toolbar, or your usual way of opening a file in fullscreen. That is often double-click in the file list when Phials is set to open that type in preview (see Default behaviors). If a preview tab for that file is already open, Phials switches to it instead of opening a duplicate.

There is no separate “preview-only” mode for generic code. Unlike Markdown, there is no second panel that renders HTML or diagrams from the file. Your edits are always the source text.

Save, revert, and keyboard shortcuts

  1. Edit in the editor. When the document differs from the last saved version on disk, an Unsaved indicator appears (shown as Unsaved changes in fullscreen).
  2. Click Save to write to disk. The button is disabled when there is nothing new to save or while a save is in progress.
  3. Click Revert to discard unsaved edits and reload the last saved content from disk.

Keyboard: use ⌘ S (macOS) or Ctrl S (Windows/Linux) to save from the editor.

Leave fullscreen

  1. Press Escape to leave the fullscreen editor. If you have unsaved changes, Phials asks whether to discard them before closing, so choose carefully to avoid losing work.
  2. You can also close the preview tab from the tab bar when you are finished. Save first if you care about keeping edits.

Large files

Files larger than 1 MB cannot be opened in this editor. You see a file too large message with the size. Use another editor or split the file if you need to work with very large sources.

Tips

  • If you expected the Markdown experience, with rendered headings and lists next to the editor, confirm the extension is .md / .markdown / .mdc and open Markdown.
  • If double-click opens an external app instead of Phials, your default behaviors may send that extension to the system default. You can still select the file and use the preview sidebar.