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 Lowry939 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
Replace Commands screenshot
  • Overview
  • Scorecard
  • Updates16

Translation status

Replace Commands

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.
  • Bulk Replacements: Right-click files or folders directly in the Files tab to run a replace action on multiple markdown files at once.
  • Quick Search Modal: Access all your configured actions quickly via a native search modal, available from the Command Palette or the "All commands" context menu option.
  • 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 the + button to create a new action and give it a name (e.g., "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.
    • Bulk actions: Select one or more files/folders in the Files tab to run the replacement on all included markdown files.
  3. Execute:
    • Editor: Right-click the editor and select your action from the Custom replace context menu.
    • Files tab: Right-click your selected files/folders and choose an action from the Custom bulk replace menu.
    • Modal/Palette: 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.

Translation Status

Translation status

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
1.1.2
Last updated
Last week
Created
7 months ago
Updates
16 releases
Downloads
939
Compatible with
Obsidian 1.13.0+
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.

Templater

Create and use dynamic templates.

Homepage

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

Linter

Format and style your notes. Linter can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular Markdown contents like list, italics, and bold styles; and more with the use of custom rule options.

BRAT

Easily install a beta version of a plugin for testing.

LanguageTool Integration

Advanced grammar and spell checking, powered by LanguageTool.

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.

Meta Bind

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

Advanced URI

Control everything with URI.

Tag Wrangler

Rename, merge, toggle, and search tags from the tag pane.