Compact Links

by uofishbox
5
4
3
2
1
Score: 51/100

Description

An Obsidian plugin that displays links in a compact format and reduces visual clutter while typing.

Reviews

No reviews yet.

Stats

0
stars
2,865
downloads
0
forks
1
days
1
days
1
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
14
commits

Latest Version

2 days ago

Changelog

Requires Obsidian 1.13.0 or later.

  • Uses Obsidian’s native settings groups and makes plugin settings searchable.
  • Fixes settings updates for open editors and improves shortening for Markdown image alt text.
  • Updates plugin metadata and dependencies, and adds GitHub build provenance attestations for all release assets.

README file from

Github

An Obsidian plugin that compacts links and image alt text in the editor to reduce visual clutter, expanding them automatically when you place your cursor on them.

Overview demo of Obsidian Compact Links Plugin

Features

For wikilinks with an alias ([[NoteTitle|Alias]]), the plugin hides the note title and displays [[|Alias]]. The full note title expands when your cursor is positioned inside the title section.

Demo of compact aliased links

Example:

  • Normal view: [[|ShortTitle]]
  • When cursor is in the title section: [[TooLongNoteTitle|ShortTitle]]

For Markdown external links ([Title](url)), the plugin shortens the URL display according to the selected mode. The full URL expands when your cursor is on the URL portion or when you click the shortened text.

Domain mode:

Demo of external links in domain mode

Hidden mode:

Demo of external links in hidden mode

Example:

  • Normal view (Domain mode): [GitHub](github.com)
  • Normal view (Hidden mode): [GitHub](...)
  • When cursor is on the URL: [GitHub](https://github.com/username/repository)

Compact Image Alt Text

For Markdown image embeds (![alt](https://raw.githubusercontent.com/uofishbox/obsidian-compact-links/HEAD/link)), alt text exceeding the configured display length is shortened. CJK characters count as 2 and other Unicode code points count as 1. Alt text within the limit is shown in full. Place the cursor in the alt text or click the shortened version to edit the full text.

Note: This applies only to Markdown image embeds (![alt](https://raw.githubusercontent.com/uofishbox/obsidian-compact-links/HEAD/link)), not wikilink embeds (![[image.png|alt]]).

Example:

  • Normal view: ![A very long ...](https://raw.githubusercontent.com/uofishbox/obsidian-compact-links/HEAD/image.png)
  • When cursor is in the alt text: ![A very long description](https://raw.githubusercontent.com/uofishbox/obsidian-compact-links/HEAD/image.png)

Installation

Development

Setup

Use Node.js 20 with npm 10 (matching the CI environment):

npm ci
npm test
npm run lint
npm run build