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
  • Join the community
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Find and replace in selection

dy-shdy-sh20k downloads

Find what you are looking for in the selected text and replace it with the specified text.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates2

This plugin for Obsidian adds a "Find and replace in selection" command. This command performs a search in the selected text, and all found characters/words/text constructions will be replaced with others. The plugin can search for plain text or regular expressions.

How to configure

Assign a hotkey to "Find and replace in selection" command.

How to use

  • In the plugin settings, specify which text to search for (plain text or regular expression) and what to replace it with.
  • Just select the text (you can select the entire note) and press hotkey or call "Find and replace in selection" command. To quickly make a replacement in one line of text, you can simply put the cursor on this line and press the hotkey.

Examples

Remove bold highlighting from all text:

  • Text to find: "**"
  • Replace by: "" (empty)

Replace all H2 headers with H3 headers:

  • RegExp to find: "^## " (space at the end)
  • RegExp flags: "gm" (global, multiline)
  • Replace by: "### " (space at the end)

If you want to make all H1 become H2, all H2 become H3, H3 become H4, then you need to start with H3, then H2, then H1.

Remove all display text from embed links:

  • RegExp to find: "(?<!\\)\!\[(.*?)(?<!\\)\]\((.*?)(?<!\\)\)"
  • RegExp flags: "gm"
  • Replace by: "![](https://raw.githubusercontent.com/dy-sh/obsidian-find-and-replace-in-selection/HEAD/$2)"

As result, this: ![Description](https://raw.githubusercontent.com/dy-sh/obsidian-find-and-replace-in-selection/HEAD/URL) will become: ![](https://raw.githubusercontent.com/dy-sh/obsidian-find-and-replace-in-selection/HEAD/URL)

78%
HealthExcellent
ReviewSatisfactory
About
Find and replace text only within a selected region or the current line using plain text or regular expressions. Replace all matches inside the selection to update headings, strip formatting, or transform embeds in-place.
EditingSearchFormatting
Details
Current version
1.0.2
Last updated
3 weeks ago
Created
5 years ago
Updates
2 releases
Downloads
20k
Compatible with
Obsidian 0.9.12+
License
MIT
Report bugRequest featureReport plugin
Sponsor
Buy Me a Coffee
Author
dy-shdy-sh
github.com/dy-sh/
GitHubdy-sh
  1. Community
  2. Plugins
  3. Editing
  4. Find and replace in selection

Related plugins

List Callouts

Create simple callouts in lists.

Symbols Prettifier

Prettify the symbols with actual symbols you commonly type, like arrows.

Smart Typography

Convert quotes to curly quotes, dashes to em dashes, and periods to ellipses.

Number Headings

Automatically number or re-number headings.

Easy Typing

Auto format when typing.

Advanced Tables

Improved table navigation, formatting, and manipulation.

Smart Connections

AI link discovery copilot. See related notes as you write. Lookup using semantic (vector) search across your vault. Zero-setup local model for embeddings, no API keys, private.

Outliner

Work with your lists like in Workflowy or Roam Research.

Meta Bind

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

Various Complements

Complete words similar to auto-completion in an IDE.