Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>DiffLinkNew to Visual Studio Code? Get it now.
DiffLink

DiffLink

ouonet

|
1 install
| (0) | Free
Open VSCode diff directly from @DiffLink markers in comments and plain-text files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

DiffLink

Open VSCode's built-in diff viewer directly from inline @DiffLink markers.

Add @DiffLink:path/to/file or @DiffLink:source, destination in a comment (or anywhere in a markdown / plain-text file), and a clickable CodeLens appears above the line plus a gutter icon — one click opens the diff.

DiffLink is designed for refactoring and migration workflows where you frequently compare old and new implementations.

Marker examples

// @DiffLink:src/legacy/OldImplementation.ts
// @DiffLink:git://HEAD~1
# @DiffLink:/Users/me/project/v1/file.py, /Users/me/project/v2/file.py
<!-- @DiffLink:docs/old.md, docs/new.md -->

Path rules

  • Relative path (no leading /): resolved from the workspace root, e.g. src/main/file.ts.
  • Absolute path (leading / or drive letter): used directly as a filesystem path.
  • Git revision (git://HEAD~1): compares the current document with the same file at that git ref. The ref must exist in the current git repository, and the current file must exist at that ref.
  • Path traversal (.., ~) and external URLs (http://, file://) are rejected.

Highlights

  • One-click diff from a CodeLens above the marker line
  • Visual gutter icon (blue diff icon, or red error icon when the path can't be resolved)
  • Single-target and explicit two-file compare formats
  • Works across common text-based files (TypeScript, Java, Python, JavaScript, Markdown, XML, shell, config, ...)
  • Local-only behavior: no source upload, no remote diff processing

Settings

Setting Default Description
difflink.commentOnly true Only match markers on lines that look like comments. Markdown and plain-text files are always scanned everywhere.

Privacy

Local-only processing. DiffLink does not upload source code or diff content.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft