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

Replace Commands

Eric LowryEric Lowry298 downloads

Preconfigure custom search and replace actions using plain text or regex to quickly modify selections or documents.

Add to Obsidian
Replace Commands screenshot
Replace Commands screenshot
Replace Commands screenshot
Replace Commands screenshot
  • Overview
  • Scorecard
  • Updates8

An Obsidian plugin that lets you preconfigure custom search and replace actions using plain text or regex to quickly modify selections or documents.

Whether you need to quickly clean up messy OCR text, standardize markdown formatting, or chain complex regex replacements, this plugin lets you save those sequences as single-click actions.

Features

  • Custom Actions: Create named actions (e.g., "Clean OCR", "Format Tables") that contain one or more search/replace rules.
  • Live Preview Test Bench: Instantly test your rules in settings using a real-time preview. Each rule shows its step-by-step intermediate output before giving the final result.
  • Sequential Processing & Reordering: Chain multiple rules perfectly and easily rearrange their execution order directly in the UI.
  • Smart Targeting: If you highlight text, the action only applies to your selection. If nothing is selected, it applies to the entire document.
  • Single-Step Undo: No matter how many rules are in your action, they are applied as a single atomic transaction. One press of Ctrl+Z undoes the entire operation.
  • Regex & Capture Groups: Full support for JavaScript Regular Expressions. Use capture groups (e.g., $1, $2) in your replacement strings.
  • Custom Regex Flags: Easily add flags like i (case-insensitive) or m (multiline) to your regex rules.
  • Plaintext Escapes: If you turn regex off, you can still search for \n (newlines) and \t (tabs) in plaintext mode.
  • Easy Access: Run your actions directly from the Obsidian Command Palette (Ctrl/Cmd + P), or add them to the right-click Editor Context Menu.

How to Use

  1. Configure an Action: - Go to Settings -> Replace Commands.
    • Click Add new action and give it a name (Example: "Fix spacing").
    • Add your search and replace terms. Toggle "Use regex" if you are using regular expressions.
  2. Apply to Text:
    • Open any note in Obsidian.
    • Targeted: Highlight a specific block of text to only apply the replacement to your selection.
    • Document-wide: Leave your cursor unselected to apply the replacement to the entire note.
  3. Execute:
    • Right-click the editor and select your action from the Custom replace context menu.
    • Alternatively: Open the Command Palette (Ctrl/Cmd + P), type your action's name, and hit Enter.
  4. Undo:
    • Made a mistake? Press Ctrl/Cmd + Z once to undo the entire action instantly.

Installation

From the Community Plugins List (Recommended)

  1. Open Obsidian and navigate to Settings → Community plugins.
  2. If Restricted mode is enabled, click Turn off to allow third-party plugins.
  3. Click Browse and search for Replace Commands.
  4. Click Install, and then click Enable.

Manually installing the plugin

To install the plugin manually from GitHub:

  1. Download the latest release from the GitHub Releases page.
  2. Extract the files and copy main.js, manifest.json, and styles.css to your vault at YourVaultFolder/.obsidian/plugins/replace-commands/.
  3. Open Obsidian, go to Settings → Community plugins, and toggle on Replace Commands.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details on how to set up the development environment and the contribution guidelines.

HealthExcellent
ReviewPassed
About
Create named, reusable search-and-replace actions using plain text or JavaScript regex to modify selections or entire documents. Test rules live with step-by-step previews, chain and reorder multiple replacements, use capture groups and custom flags, and apply them as a single undoable operation from the Command Palette or editor context menu.
EditingSearchAutomation
Details
Current version
0.5.0
Last updated
2 weeks ago
Created
3 months ago
Updates
8 releases
Downloads
298
Compatible with
Obsidian 1.7.2+
Platforms
Desktop, Mobile
License
0BSD
Report bugRequest featureReport plugin
Sponsor
Buy Me a Coffee
Author
Eric LowryEric Lowryrougeeric
eric-lowry.com
GitHubelowry
lemmy.zip
reddit.com
  1. Community
  2. Plugins
  3. Editing
  4. Replace Commands

Related plugins

MetaEdit

Manage your metadata.

Advanced Tables

Improved table navigation, formatting, and manipulation.

Templater

Create and use dynamic templates.

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.

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.

Omnisearch

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

Quick Switcher++

Enhanced Quick Switcher, search open panels, and symbols.

Lazy Loader

Load plugins with a delay on startup, so that you can get your app startup down into the sub-second loading time.