MD LinksMakes it easier to work with links in your Markdown files. Add links in a couple of keystrokes, and never let a link break when you move or rename a file
Only the link target changes. Your formatting, link text, titles, Insert a link —
|
| Command | What it does |
|---|---|
MD Links: Repair broken references in workspace |
Scan every Markdown file, preview the fixes, and apply them once you confirm. |
MD Links: Repair broken references in current file |
Only scan the Markdown file you currently have open. |
MD Links: Insert link to file… |
Search for a workspace file and insert a relative Markdown link at the cursor (Alt+M Alt+L). |
Settings
| Setting | Default | Description |
|---|---|---|
fixRefs.autoFixOnRename |
true |
When a file is moved or renamed, offer to fix Markdown references to its old path. |
fixRefs.warnOnDelete |
true |
When a file is deleted, warn if any Markdown links still point to it. |
fixRefs.exclude |
[] |
Extra glob patterns to ignore when scanning. |
fixRefs.insertLinkStyle |
relative |
Whether Insert link to file writes a relative (portable) or absolute (full) path. |
The Alt+M Alt+L shortcut is fully rebindable in Keyboard Shortcuts
(Ctrl+K Ctrl+S → search "MD Links: Insert link to file").
How it works
The extension is a thin VS Code shell over the
fix-refs library, which parses
Markdown into an AST and rewrites only the URL token of broken links. Everything
else in the document stays byte-for-byte unchanged.
On top of the library, the extension also listens for VS Code's file rename/move events, so it can catch files that were renamed (not just moved). The rename mapping is passed straight to the fixer, which lets it repair references that a path-based search alone couldn't detect.
Requirements
- VS Code 1.75 or later
- Node.js 18 or later (bundled with VS Code on most platforms)






