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

Find and replace in selection

dy-shdy-sh22k 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)

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
2 months ago
Created
5 years ago
Updates
2 releases
Downloads
22k
Compatible with
Obsidian 0.9.12+
Platforms
Desktop, Mobile
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

Easy Typing

Auto format when typing.

List Callouts

Create simple callouts in lists.

Advanced Tables

Improved table navigation, formatting, and manipulation.

Smart Connections

Find related notes and excerpts while writing. Your AI link building copilot displays relevant content in graph + list view. A local embedding model powers semantic search. Zero setup. No API key.

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.

Omnisearch

Intelligent search for your notes, PDFs, and OCR for images.

Quick Switcher++

Enhanced Quick Switcher, search open panels, and symbols.

Admonition

Admonition block-styled content.

Quiet Outline

Make outline quiet and more powerful, including no-auto-expand, rendering heading as Markdown, and search support.