Easy Links

by Saiki77
5
4
3
2
1
New Plugin

Description

Hide the folder path in internal links so only the file name shows, in both reading view and live preview, while keeping the link target intact. Optional smart [[ suggester floats notes from your most-used folders to the top. - This plugin has not been manually reviewed by Obsidian staff.

Reviews

No reviews yet.

Stats

stars
downloads
0
forks
0
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

Github

Internal links that include a folder, like [[Personal/SurfacerAI]], normally display the whole path. Easy Links shows just the file name — SurfacerAI — while keeping the link target untouched, so clicking still navigates exactly where it did. Aliased links like [[Personal/SurfacerAI|Alias]] are left alone.

Features

  • Hide the folder path — un-aliased internal links show only the basename (A/B/NoteNote), in both reading view and live preview. Heading and block refs are preserved: only slashes in the folder path are collapsed, so A/B#HeadingB#Heading and a slash inside an anchor (Note#A/B) is left untouched.
  • Embeds keep their full path![[A/B]] is not shortened in either mode, so embed labels stay consistent between live preview and reading view.
  • Edit-friendly live preview — optionally reveal the full path on the line your cursor is on, so links stay easy to edit.
  • Plain link color — optionally color internal links like normal text instead of the accent color.
  • Smart link suggester — optionally replace Obsidian's built-in [[ popup for the plain case, floating notes from your most-used (or hand-picked) top-level folders to the top of the autocomplete. Off by default. Heading (#), block (^), and alias (|) completions still use the built-in popup.

When Smart link suggester is on, typing [[ opens a popup that ranks notes from your priority folders first, then by fuzzy match. It matches against both a note's file name and its frontmatter aliases, just like the built-in popup, and inserts links using your configured link format (fileManager.generateMarkdownLink), so wikilink-vs-markdown and shortest-path settings are respected. An empty query (just [[) lists priority-folder notes most-recently-modified first.

Priority folders are auto-detected as the top-level folders containing the most markdown notes, recomputed as the vault changes. Set Priority folders to pin specific folders instead.

This feature only intercepts the plain [[query case (no ], #, ^, |). Anything else falls through to Obsidian's native suggester untouched. To win precedence over the core link popup it reorders Obsidian's internal editor-suggest list; this is an undocumented internal API, accessed defensively and reverted when the feature is turned off or the plugin unloads, so disabling it fully restores the stock behavior.

Settings

  • Hide folder path in reading view — shorten un-aliased link labels in reading view.
  • Hide folder path in live preview — visually collapse the folder prefix in live preview.
  • Reveal full path on the active line — show the full path on the cursor's line for editing.
  • Plain link color — color internal links like normal text.
  • Smart link suggester — float notes from your most-used folders to the top of the [[ autocomplete (off by default).
  • Priority folders — comma-separated top-level folder names to float to the top, in order. Empty = auto-detect the folders with the most notes.
  • Number of priority folders — how many top-level folders to auto-detect as priority (1–5; ignored when Priority folders is set).

Development

A TypeScript project bundled with esbuild (entry src/main.ts → root main.js). The live-preview feature uses Obsidian's bundled CodeMirror 6, so @codemirror/view and @codemirror/state are dev-only dependencies (esbuild externalizes @codemirror/*; they are never bundled).

Obsidian declares an exact peer on @codemirror/state, while @codemirror/view pulls a newer patch of it, so .npmrc sets legacy-peer-deps=true to let npm resolve the tree. A package-lock.json is committed so npm ci is reproducible in CI.

npm install          # install dev dependencies (honours .npmrc legacy-peer-deps)
npm run dev          # esbuild watch build (inline sourcemap, no minify)
npm run build        # tsc --noEmit typecheck, then a minified production bundle
npm run lint         # eslint with the Obsidian plugin-guideline rules

styles.css is hand-written at the repo root and auto-loaded by Obsidian. main.js and styles.css are committed — they are the release assets.

Release

npm version <x.y.z>  # bumps package.json, syncs manifest.json + versions.json, makes a bare tag
git push --follow-tags

Pushing the tag triggers .github/workflows/release.yml, which runs npm ci, lints, builds, verifies manifest.json matches the tag, attests build provenance, and publishes a GitHub release with main.js, manifest.json, and styles.css.