Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Copy on Selection

cofuentecofuente21 downloads

Automatically copies highlighted text to the clipboard when the selection changes, mirroring Linux primary-selection behavior.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

An Obsidian plugin that automatically copies highlighted text to the clipboard whenever the selection changes — the same behavior Linux users know as "primary selection" on X11, brought into Obsidian on every platform.

Works for both mouse drags and keyboard selection (Shift+arrows, Shift+Home, double-click, triple-click). Debounced so that fast keyboard selection doesn't spam the clipboard.

Install

From the Community Plugins browser

(Once the plugin is accepted by the Obsidian team.)

  1. Open Settings → Community plugins
  2. Turn off Restricted mode if it's on
  3. Click Browse, search for Copy on Selection
  4. Click Install, then Enable

Manually

  1. Download main.js and manifest.json from the latest release
  2. Place both files in <your-vault>/.obsidian/plugins/copy-on-selection/
  3. In Obsidian, go to Settings → Community plugins, click the reload icon, and toggle Copy on Selection on

Settings

Setting Default Description
Debounce (ms) 150 How long to wait after the selection stops changing before copying. Lower = more immediate, higher = fewer writes.
Minimum selection length 1 Selections shorter than this are ignored.
Show notice on copy ✓ Briefly display a toast each time text is copied.
Enable on touch (mobile) ✗ Also fire after touch-based selection. iOS may silently block clipboard writes outside direct user gestures.

A Reset button at the bottom of the settings tab restores every value to its default.

Known limitations

  • iOS clipboard restrictions. On iOS, navigator.clipboard.writeText() only works from direct user gestures. Selection-triggered copies may fail silently in some contexts. If mobile support matters to you, keep "Enable on touch" off until you've verified it works in your setup.
  • No clipboard-history integration. The plugin overwrites the clipboard on each selection change. If you rely on a clipboard manager, entries will accumulate quickly during active reading.
  • No editor-/reading-view gating. Selections in either view are copied. Open an issue if you'd like a setting to restrict this.

Development

This project is set up for a Docker-based dev loop so nothing needs to be installed on the host.

docker compose build
docker compose up        # or: docker compose watch

esbuild runs in watch mode inside the container and writes main.js to the repo root. Symlink the repo into your vault's plugins directory so Obsidian picks it up:

ln -s "$(pwd)" /path/to/vault/.obsidian/plugins/copy-on-selection

After each rebuild, toggle the plugin off and on in Obsidian's community plugins list to pick up the new main.js (or install the Hot-Reload community plugin to automate this).

License

MIT — see LICENSE.

87%
HealthExcellent
ReviewSatisfactory
About
Copy highlighted text to the clipboard automatically whenever the selection changes, bringing X11-style primary selection to Obsidian on all platforms. Debounce rapid selections to avoid spamming the clipboard and support mouse and keyboard selection; respect iOS clipboard restrictions that may prevent selection-triggered writes.
AutomationEditing
Details
Current version
0.1.0
Last updated
Last month
Created
Last month
Updates
1 release
Downloads
21
Compatible with
Obsidian 1.5.0+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
cofuentecofuente
cofuente.io
GitHubcofuente
  1. Community
  2. Plugins
  3. Automation
  4. Copy on Selection

Related plugins

MetaEdit

Manage your metadata.

Filename Heading Sync

Keep the filename with the first heading of a file in sync.

Advanced Tables

Improved table navigation, formatting, and manipulation.

QuickAdd

Quickly add new notes or content to your vault.

Templater

Create and use dynamic templates.

Homepage

Open a note, base, or workspace on startup, or set it for quick access later.

BRAT

Easily install a beta version of a plugin for testing.

Meta Bind

Make your notes interactive with inline input fields, metadata displays, and buttons.

Outliner

Work with your lists like in Workflowy or Roam Research.

Various Complements

Complete words similar to auto-completion in an IDE.