Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Troff PreviewNew to Visual Studio Code? Get it now.
Troff Preview

Troff Preview

Clemens Horch

|
1 install
| (0) | Free
Preview Troff documents in a side-by-side editor pane.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Troff Preview

Preview Troff and roff documents in a side-by-side VS Code editor pane. The extension renders the current editor contents with GNU groff and refreshes the preview as you edit, including unsaved changes.

Features

  • Side-by-side HTML preview for Troff, roff, and numbered man pages.
  • Live refresh while editing.
  • Configurable groff macro package, with man as the default.
  • Uses groff's safer mode when rendering documents.

Requirements

Install GNU groff and make sure groff is available on the extension host's PATH. The HTML output device must be installed. Verify it by running:

groff -S -Thtml -m man

For remote workspaces, install groff in the environment where the VS Code extension host runs.

Usage

Open a .tr, .troff, .roff, or numbered man-page file, then run Troff: Open Preview from the Command Palette or press Ctrl+Shift+V (Cmd+Shift+V on macOS). The preview opens beside the editor and follows unsaved edits.

Settings

troffPreview.macroPackage selects the groff macro package. It defaults to man; set it to ms, me, another installed package, or an empty string for plain Troff.

Development

npm ci
npm run compile
npm run lint

Press F5 in VS Code to launch an Extension Development Host.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft