Nifty Print
Print code or save it as PDF with syntax highlighting, line numbers and headers: a file, a selection or several files at once, via your browser's print dialog. Markdown prints rendered.
Maintained. No sign-in. No telemetry. Works in VS Code, Cursor, Windsurf, VSCodium and other editors that use Open VSX.
Features



- Print code properly. Right-click in the editor, its tab or the Explorer and choose Print…. The code opens in your browser with syntax highlighting, line numbers and a header, and the print dialog appears. Print it, or choose Save as PDF.
- A selection, a file or many. Print just the selected lines (numbered as in the file), the whole file, several files selected in the Explorer, or a whole folder. Each file starts on a new page, and binary files are skipped.
- Markdown prints rendered, like the preview, not as source.
- Made for paper. Long lines wrap instead of being cut off, lines aren't split across pages, and the light theme saves ink. Font size, line numbers, header and theme are all settings.
- Export as HTML saves the same page as a single self-contained file, with no external resources, to share or archive.
- 190+ languages via highlight.js. Nothing is uploaded; the page is written locally and opened by your own browser.
- Works in the browser on vscode.dev and github.dev. Printing is desktop-only; in the browser, Export as HTML and print the saved page.
Commands
| Command |
What it does |
Nifty Print: Print… |
Open the file, selection or selected files in the browser's print dialog |
Nifty Print: Export as HTML… |
Save the printable page as an HTML file |
Settings
| Setting |
Default |
What it does |
nifty.print.lineNumbers |
true |
Print line numbers |
nifty.print.wrapLines |
true |
Wrap long lines |
nifty.print.fontSize |
11 |
Code font size |
nifty.print.theme |
light |
light or dark |
nifty.print.header |
true |
File name and line range above each file |
nifty.print.renderMarkdown |
true |
Print Markdown rendered |
nifty.print.maxFiles |
50 |
Most files to print from a folder |
nifty.print.keybinding |
false |
Use Ctrl+Alt+P (Cmd+Alt+P) to print |
Credits
Syntax highlighting by highlight.js (BSD 3-Clause License).
Install
- VS Code: search for "Nifty Print" in the Extensions view, or install from the Visual Studio Marketplace.
- Cursor, Windsurf, VSCodium, Kiro, Antigravity: install from Open VSX.
Privacy
This extension collects no telemetry and needs no account.
- Nifty Beautify: Format HTML in PHP, Blade & Twig: Format HTML inside PHP, Blade, Twig, Jinja, Handlebars, ERB and Liquid templates without breaking the template tags. (Open VSX)
- Nifty CSS Classes: Class Name Completion: Complete CSS class names in HTML, JSX, Vue, Svelte, PHP and templates from your stylesheets, including SCSS nesting and linked files, with hover and go to definition. (Open VSX)
- Nifty Diagrams: PlantUML, Graphviz & D2 Preview: PlantUML, Graphviz (DOT) and D2 diagrams rendered on your machine: live preview beside the editor, SVG and PNG export, diagrams in the Markdown preview, errors in Problems. No server needed. (Open VSX)
- Nifty Markdown: TOC, Lists, Shortcuts & Paste: Markdown editing that keeps up: table of contents, section numbers, smart lists and task toggles, formatting keys, image paste, link checks and completions, and math in the preview. (Open VSX)
- Nifty Mermaid: Mermaid Diagram Preview & Export: Mermaid diagrams with no account: live preview beside .mmd files and Markdown, diagrams in the Markdown preview, syntax highlighting, and export to SVG or PNG. (Open VSX)
- Nifty Paired Notebooks: Notebooks as .py Files: Keep Jupyter notebooks paired with plain Python (percent format) or Markdown files: readable git diffs, edit either side, outputs kept, and open any .py script as a notebook. (Open VSX)
See all 100+ Nifty extensions and web tools at https://getnifty.dev
| |