Turn Diff snippets into images worth sharing, without leaving your Mac.
Diffs are the single best argument for sharing code as an image: the green and red carry the meaning, and both are lost the moment it becomes plain text.
Codeshot detects Diff from the code you paste, so there is no language picker to get wrong. Here is the same snippet in three of the 30 themes it ships with, rendered with the app's own stylesheets.
@@ -12,7 +12,7 @@ struct Snapshot {
let code: String
var theme: Theme = .xcode
- var scale: Int = 1+ var scale: Int = 2
func export(to path: URL) throws {
Atom One · dark
@@ -12,7 +12,7 @@ struct Snapshot {
let code: String
var theme: Theme = .xcode
- var scale: Int = 1+ var scale: Int = 2
func export(to path: URL) throws {
GitHub · dark
@@ -12,7 +12,7 @@ struct Snapshot {
let code: String
var theme: Theme = .xcode
- var scale: Int = 1+ var scale: Int = 2
func export(to path: URL) throws {
Solarized · dark
Choosing a theme for Diff
Do not trim the hunk header. The line numbers are what tell people where in the file they are looking.
Getting the size right
Let the image follow your content, or lock it to a ratio — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3, or 3:4 — then export at 1×, 2×, or 3× so it stays sharp on a retina display. Copy it straight to the clipboard with ⌘⇧C, or save with ⌘S.