Skip to content

Instantly share code, notes, and snippets.

@kmatt
Created July 10, 2025 17:11
Show Gist options
  • Save kmatt/41f3aac9e44a5cf1b27a76c83d8ded92 to your computer and use it in GitHub Desktop.
Save kmatt/41f3aac9e44a5cf1b27a76c83d8ded92 to your computer and use it in GitHub Desktop.
Side-by-side diff in Zed

Using https://github.com/dandavison/delta

~/.gitconfg

[core]
    pager = delta

[interactive]
    diffFilter = delta

[delta]
    navigate = true    # use n and N to move between diff sections
    side-by-side = true

~/.config/zed/tasks.json

[
  {
    "label": "gitdiff",
    "command": "git diff $ZED_FILENAME"
  }
]

~/.config/zed/keymap.json

[
  {
    "context": "Editor",
    "bindings": {
      "alt-g": [
        "task::Spawn",
        { "task_name": "gitdiff", "reveal_target": "center" }
      ]
    }
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment