Easy Copy

by Moy
5
4
3
2
1
Score: 54/100

Description

Category: Productivity Tools

The Easy Copy plugin simplifies the process of copying specific types of content within Obsidian by smartly detecting the context around the cursor. It allows users to instantly copy inline code, bold text, highlighted sections, italicized words, block IDs, and heading links without manually selecting text. Users can fine-tune which types of content to target and adjust link formats for copied headings.

Reviews

No reviews yet.

Stats

39
stars
7,013
downloads
4
forks
384
days
1
days
1
days
14
total PRs
0
open PRs
1
closed PRs
13
merged PRs
23
total issues
2
open issues
21
closed issues
0
commits

Latest Version

2 days ago

Changelog

[1.6.1] - 2026-05-12

✨ Added

  • Code block copy: When the cursor is inside a fenced code block (```), the smart copy command now copies the block content directly — no more accidentally triggering block ID generation.
  • Code block copy behavior setting: A new "Code Block" settings group lets you choose what happens when copying from inside a code block:
    • Copy plain text (default) — copies the code content without the surrounding ``` fence lines
    • Copy code block (with fences) — copies the full block including the opening ```lang and closing ``` lines
    • Generate block link — falls through to the existing block ID generation behavior (same as before this feature)
    • Disabled — skips code block detection entirely

✨ 新增

  • 复制代码块:当光标位于代码块(```)内时,智能复制命令现在会直接复制代码块内容,不再误触发块ID生成。
  • 代码块复制行为设置:新增「代码块」设置分组,可自定义在代码块内按下智能复制时的行为:
    • 复制纯文本(默认)—— 复制代码内容,不含前后的 ``` 围栏行
    • 复制代码块(含 ``` —— 复制完整代码块,包括开头的 ```lang 和结尾的 ```
    • 生成块链接 —— 沿用原有的块ID生成逻辑(与此功能上线前行为一致)
    • 禁用 —— 跳过代码块检测,不做任何特殊处理

[1.6.0] - 2026-05-09

✨ Added

  • Paste-time link path resolution: When "Resolve link path on paste" is enabled, Easy Copy regenerates link paths based on the destination file's location at paste time.
    • Under "Follow Obsidian settings", uses your vault's configured path style (shortest / relative / absolute)
    • Under explicit Wiki/Markdown format, uses shortest-unique paths only
    • Same-file heading paste simplifies automatically (e.g. [[#Setup]] instead of [[MyProject#Setup]])

🐛 Fixed

  • simplifiedHeadingToNoteLink setting now correctly controls link simplification (previously had no effect in some configurations)

♻️ Changed

  • Extracted copyMetadata.ts and pasteResolution.ts as pure-function modules with full test coverage
  • Added 98 new tests (total: 184)

✨ 新增

  • 粘贴时解析链接路径:启用「粘贴时解析链接路径」后,Easy Copy 会在粘贴时根据目标文件位置重新生成链接路径。
    • 使用「跟随 Obsidian 设置」时,沿用软件设置中的路径风格(最短/相对/绝对)
    • 使用明确的 Wiki/Markdown 格式时,仅使用最短唯一路径
    • 同一文件内粘贴标题自动简化(如 [[#Setup]] 而非 [[MyProject#Setup]]

🐛 修复

  • simplifiedHeadingToNoteLink 设置现在正确控制链接简化逻辑(之前在某些配置下无效)

♻️ 变更

  • 提取 copyMetadata.tspasteResolution.ts 为纯函数模块,完整测试覆盖
  • 新增 98 个测试(总计 184 个)

README file from

Github

Easy Copy - Make Copying Smart and Simple!

English | 中文文档

Obsidian Download Total Downloads GitHub Issues GitHub Last Commit

Easy Copy can smartly copy content based on your cursor position (e.g. code text inside inline code, without formatting symbols).
Besides, it also supports quickly generating and copying links to headings or paragraphs(blocks) in your notes.

✨ Features

  • 🚀 Easy to Use - You only need one command to complete various copy operations
  • 🧙‍♂️ Smart Detection - Automatically identifies and copies different types of content based on cursor position
  • 🔍 Multiple Format Support - Copy inline code, bold text, highlighted text, italic text, block linkss, and heading links
  • 📝 Auto Generate - Automatically generate heading links, or generate a new block ID for the current paragraph and copy the block link
  • 🌐 Multilingual Support - Full support for English, Simplified Chinese, and Traditional Chinese

🤔 Why use this plugin

📝 Copy the text inside Inline Code

I often use inline code for debug commands or keywords and need to quickly copy the content inside the ` symbols. In the past, I had to carefully select the text wrapped inside... which was quite tedious! I want to directly copy the text inside the inline code
So I created this plugin - just place your cursor inside the inline code, and copy with a single keystroke!

Just like this:

demo

It also supports copying bold text, highlighted text, italic text. (If you don't need these features, you can disable them in the settings)

[!IMPORTANT] Due to the limitations of Obsidian plugins, the default does not assign a shortcut key,
you need to assign a shortcut key in Obsidian's keyboard settings for the "Easy Copy: Contextual Copy" command.
I personally recommend using Ctrl+Alt+C.

Even more surprisingly, if you place the cursor on the heading line and press the same "Contextual Copy" shortcut key, you can copy the internal link pointing to the heading!

copy-heading

[!TIP] You can choose between markdown link format ([]()) and wiki link format ([[]]) in the plugin settings.

Not only that, it will use the heading text as the display text, effectively reducing the length of the link.

From [[Note Name#Heading Text]] to [[Note Name#Heading Text|Heading Text]], the text content is longer, but the visual effect is shorter!

The difference looks like this:

heading-compare

If the current text contains an existing block link, the plugin will copy the link pointing to this block, just like it does with the title.

After version 1.2.0, the plugin also supports automatically generating block links for the current text (you need to enable the Auto generate block ID option in the settings):

When there is no content at the cursor position to copy, it will automatically generate a random block ID for the current paragraph and copy the link to the clipboard.
Moreover, the copied link will use the text's summary as the display text, so you won't have to deal with the confusing random characters of the Block ID!

copy-block-id

If you prefer, you can also enable "Manually enter Block ID" in the settings (only letters, numbers, hyphens (-) and underscores (_) are supported).

🪄 How to Use

  1. Basic Usage: Place the cursor at the position you want to copy, and use the Contextual Copy command to copy.
  2. You can also assign a hotkey, and press it to copy with one click. hotkey
  3. The plugin also provides a right-click menu operation menu-item

🔧 Settings

General

  • Add to Menu - Add the command to the right-click menu.
  • Show Notifications - Show a notification when content is copied.
  • Use Title as Display Text - Use the title text as the display text in the link.

Format

  • Link Format - The format used when copying title links (Markdown link or Wiki link).
    • Markdown link: (Display Text)[Link]
    • Wiki link: [[Link|Display Text]]

Block ID

  • Auto-generate Block ID - When enabled, if there is no content at the cursor position to copy, it will automatically generate a random block ID for the current paragraph and copy the link to the clipboard.
  • Manually enter Block ID - When enabled, you can manually enter a new block ID (in this case, the display text will directly use the text you entered)

Copy Target

  • Custom Copy Target - When enabled, you can customize which elements can be copied, allowing you to exclude specific types (such as bold or italic text) to avoid copying them.

🛠️ Installation

The plugin is now available in the community plugins list, you can search for "Easy Copy" to install it.

(Alternatively, you can also use the BRAT plugin to install it)

🤝 Contribution

Issues and feature requests are welcome! If you'd like to contribute to this project, feel free to submit a PR.

This plugin really improved my workflow, and I hope it can help you too! 🌟