A Sublime Text Plugin that provides wiki-style link navigation for text files. Similar functionality to obsidian, allowing linking files using [[filename]] syntax and navigate between them with hover previews and keyboard shortcuts.
"In Obsidian, a [[wiki link]] is a way to create internal links between notes using a specific syntax: [[Note Title]]. This allows for easy navigation between notes and is the default linking method in Obsidian. While it's not part of the standard Markdown specification, it's widely supported by many other apps for linking within the same knowledge base"
- Hover Previews: Hover over wiki links to see file previews in a popup
- Click Navigation: Ctrl+click on links to open files
- Keyboard Navigation: Alt+Enter to navigate to link at cursor
- Auto File Creation: Creates new files when navigating to non-existent links
- Multi-format Support: Automatically searches for files with common extensions (.txt, .md, .py, .html, .css, .js)
- Workspace Integration: Searches all folders in your Sublime Text workspace
Create links to other files using double square brackets:
Some text then boom a [[filename]], this allows you to embed link similar to [[Obsidian]] wiki link feature.
And other [[Idea-Name]]
[[project/documentation]]
The plugin supports several link formats:
- Basic links:
[[filename]]- Searches for files with common extensions - Relative paths:
[[main/Adjectives]],[[English/main/Adjectives]]- Paths relative to current file or workspace - Explicit extensions:
[[Adjectives.md]],[[notes.txt]]- Files with specific extensions - Fragment identifiers:
[[Adjectives#Section-one]]- Links to specific sections - Combined:
[[main/Adjectives.md#Grammar-Rules]]- Path, extension, and section
- Hover Preview: Simply hover your mouse over any wiki link to see a preview popup showing the first 15 lines of the target file
- Ctrl+Click: Hold Ctrl and click on any wiki link to open the target file
- Keyboard Shortcut: Place your cursor on a wiki link and press Alt+Enter to navigate
The plugin searches for files in this order:
- Relative to current file: If the link contains a path (e.g.,
[[main/Adjectives]]), it first tries relative to the current file's directory - Exact filename match in workspace: Searches all workspace folders for the exact path
- Filename with common extensions: If no extension is specified, tries
.txt,.md,.py,.html,.css,.js - Recursive search: For simple filenames (no path), recursively searches all workspace folders
- File creation: If no file is found, creates a new file (defaults to
.mdextension if none specified)
When using fragment identifiers (e.g., [[document#section-name]]):
- The plugin searches for markdown headers matching the fragment name
- Supports headers at any level (
#,##,###, etc.) - Also matches plain text lines that exactly match the fragment
- Handles hyphens and underscores as word separators (e.g.,
section-namematchesSection Name) - When creating a new file with a fragment, it automatically adds a markdown header
This is a link to [[my-project-notes]].
You can also link to [[subfolder/specific-file]].
Links without extensions [[todo]] will search for todo.txt, todo.md, etc.
Links with extensions [[notes.md]] will open that exact file.
Fragment links [[document#section-name]] navigate to specific sections.
- Save the plugin file as
WikiLinks.pyin your Sublime Text Packages/User directory - Add the key binding to your user key bindings file (Preferences → Key Bindings):
[
{
"keys": ["alt+enter"],
"command": "wiki_link_navigate_at_cursor",
"context": [
{"key": "selector", "operator": "equal", "operand": "text"}
]
}
]- Restart Sublime Text or reload the plugin
wiki_link_navigate_at_cursor: Navigate to wiki link at current cursor position
- Checks current workspace folders first
- Falls back to current file's directory if no workspace is open
- Supports both relative and absolute path references
- Automatically appends common file extensions if none specified
- Shows first 15 lines of target files
- HTML-escaped content for safe display
- Scrollable preview for longer content
- Error handling for unreadable files
Links not working: Ensure your files are in the current workspace or in the same directory as your current file.
Preview not showing: Check that the target file exists and is readable.
Keyboard shortcut conflicts: Modify the key binding in your user settings if Alt+Enter conflicts with other plugins.
project/
├── index.md # Contains [[notes]] and [[todo]]
├── notes.md # Contains [[project/details]] and [[main/Adjectives#Grammar]]
├── todo.txt
├── main/
│ └── Adjectives.md # Contains ## Grammar section
└── project/
└── details.md
With this structure, all wiki links will resolve correctly and you can navigate between files seamlessly.
[[notes]]→ searches for notes.txt, notes.md, etc.[[project/details]]→ relative path from workspace or current file[[main/Adjectives.md]]→ explicit extension[[main/Adjectives#Grammar]]→ navigates to ## Grammar section[[Adjectives#section-name]]→ searches workspace and navigates to section