Code screenshots
Turn code into a clean image for a slide, a post or a doc.
Make one
- Copy some code (⌘C) in any app.
- Open the menu-bar icon › More Captures › Code Screenshot from Clipboard.
- A window opens with a live preview.
- Click Copy to put the image on the clipboard, or Save (Return) to add it to your Library like any capture.
If the clipboard has no text, you see "Copy some code first".
Pair it with Code-aware Copy Text: copy code from a video call or an image, then make a nice picture of it.
Options
- Theme: Midnight, Paper or Sunset.
- Language: Auto (guessed) or choose Plain text, Swift, Python, JavaScript / TypeScript, Go, Rust, Java, JSON, Shell or SQL. This sets the syntax colors.
- Padding: S, M or L.
- Window chrome: the three-dot title bar.
- Title: text in the title bar.
- Line numbers.
The preview updates as you change them.
Limits
- Very long code is cut. The window says "Too long: only the first part is shown".
- Highlighting is simple. Keywords, strings, comments, numbers and type names are colored. It is not a full parser.
- The language guess can be wrong. Pick it by hand.
- Check the code for secrets before you publish the picture.