kdnk17k downloadsautomatically converts plain text file references into wiki links
Automatically convert plain text file references into Obsidian wiki links as you write. Keep your knowledge graph connected without manual linking.
Automatic Linker scans your notes and intelligently converts text that matches file names in your vault into wiki links ([[...]]). Whether you're writing quick notes or maintaining a complex knowledge base, this plugin ensures your notes stay interconnected without interrupting your flow.
main.js, manifest.json, and styles.css to your vault's .obsidian/plugins/automatic-linker/ directoryThe plugin automatically detects file names in your text and converts them to wiki links. It works seamlessly with:
automatic-linker-off settingOrganize large vaults with sophisticated namespace handling:
automatic-linker-scoped: true in frontmatter to restrict linking to files within the same namespaceTransform raw URLs into readable Markdown links automatically:
https://github.com/user/repo/issues/123 to [user/repo#123](URL)[Page Title](URL) format (cached to minimize requests)Fine-tune linking behavior to match your workflow:
automatic-linker-exclude: true to frontmatter to exclude files from auto-linking2025-02-10) for compatibility with Obsidian Tasks[[path/to/file]])Access these commands via the Command Palette (Cmd/Ctrl + P):
| Command | Description |
|---|---|
| Automatic Linker: Format file | Convert text to links in the current file |
| Automatic Linker: Format selection | Convert only selected text to links |
| Automatic Linker: Format vault | Batch process all files in your vault |
| Automatic Linker: Copy file without links | Copy current file content with links as plain text |
| Automatic Linker: Copy selection without links | Copy selected lines with minimal indent and links removed |
| Automatic Linker: Rebuild index | Rebuild the file index for link candidates |
Format on save converts links when you explicitly save a note. Automatic Linker then saves the note that received the save command, even if another pane becomes active during link conversion. With this setting disabled, saving delegates directly to Obsidian.
When Bullet is enabled, Automatic Linker skips its own automatic formatting on save, regardless of Bullet's formatting, save, or integration settings. Disabling Bullet restores Automatic Linker's configured format-on-save behavior. Manual formatting commands and the formatText integration API remain available while Bullet is enabled. Automatic Linker does not run Prettier or Linter.
Formatting preserves frontmatter exactly. Standalone commands preserve text typed during title lookup and apply fetched titles to the latest editor text. New URLs wait until the next formatting request for title lookup. Switching notes, renaming the file, changing editors, or unloading the plugin discards the pending editor update. Repeated requests are combined into one trailing run with the latest text.
For plugin integrations, isFormatOnSaveEnabled() reports the linker save setting. formatText(text, file, options) returns a promise of transformed Markdown without changing an editor. The transform reads opt-outs from the supplied text, respects excluded folders, and fetches URL titles. Set normalizeExistingWikilinks in options to control existing-link normalization, subject to the linker's setting.
2025-02-10.*. to exclude one or more subdomains without excluding the apex domain. For example, google.com excludes google.com and its subdomains, while *.google.com excludes mail.google.com but not google.com.You have files: Python.md, JavaScript.md, pages/TypeScript.md
When you type:
I'm learning Python and JavaScript for web development.
It becomes:
I'm learning [[Python]] and [[JavaScript]] for web development.
With Obsidian's "Folder to create new notes in" set to pages/ and "Respect 'Folder to create new notes in' setting" enabled, along with Proximity-based Linking enabled:
File structure:
pages/
languages/
Python.md
TypeScript.md
frameworks/
React.md
Current file: pages/frameworks/React.md
When you type: React uses TypeScript
It becomes: [[frameworks/React]] uses [[languages/TypeScript]]
File pages/team-a/internal.md has frontmatter:
---
automatic-linker-scoped: true
---
Current file: pages/team-a/notes.md
Typing internal creates [[team-a/internal]] ✅
From pages/team-b/notes.md, typing internal won't link ❌
Before:
Check out https://github.com/obsidianmd/obsidian-releases/issues/1234
After:
Check out [obsidianmd/obsidian-releases#1234](https://github.com/obsidianmd/obsidian-releases/issues/1234)
When you select part of a nested list:
Selection in editor:
- Priority about [[PBI]]
- High priority for near deadline
- Chapter [[PBI]]
- Up to 30% [[story point]] in sprint backlog
After running "Copy selection without links", clipboard contains:
- Priority about PBI
- High priority for near deadline
- Chapter PBI
- Up to 30% story point in sprint backlog
Features:
[[path/to/file]] → fileAdd these to individual note frontmatter:
---
# Disable formatting and URL title fetching in this file (including vault and selection commands)
automatic-linker-off: true
# Exclude this file from being automatically linked from other files
automatic-linker-exclude: true
# Restrict linking to same namespace only
automatic-linker-scoped: true
# Disable URL title fetching and replacement in this file
automatic-linker-disable-url-title: true
# Define aliases for this file (standard Obsidian feature)
aliases: [shortname, alternative-name]
---
# Clone the repository
git clone https://github.com/kdnk/obsidian-automatic-linker.git
cd obsidian-automatic-linker
# Install dependencies
pnpm install
# Start development mode
pnpm dev
pnpm build # Build for production
pnpm dev # Development mode with watch
pnpm test # Run all tests
pnpm test:watch # Run tests in watch mode
pnpm tsc:watch # TypeScript type checking in watch mode
# Run a specific test file
npx vitest run src/path/to/test.ts
# Run tests matching a pattern
npx vitest run -t "test description"
src/
├── main.ts # Main plugin entry point
├── settings/ # Settings UI and types
├── replace-links/ # Core link replacement logic
├── replace-urls/ # URL formatting (GitHub, Jira, Linear)
├── replace-url-with-title/ # Bare URL to titled link conversion
├── exclude-links/ # Link exclusion logic
├── remove-minimal-indent/ # Remove minimal indentation from text
├── trie.ts # Trie data structure for efficient matching
└── update-editor.ts # Editor update utilities
Links aren't being created:
Proximity-based Linking not working:
Performance issues:
updateEditor function adapted from obsidian-linterThis project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Kodai Nakamura
If you find this plugin useful, consider starring the repository on GitHub!