Skip to content

yunhojeon/obsidian-batch-search-replace

Repository files navigation

Batch Search & Replace

An Obsidian plugin for vault-wide find and replace. Search across all your notes at once, review matches in context, and replace individually or in batch.

Features

  • Global search across your entire vault
  • Search options: case sensitivity, whole word matching, regular expressions
  • Replace: optional replace input with individual per-match replace or Replace All
  • File filters: include/exclude files using glob patterns (e.g. notes/**, *.md), values persist across sessions
  • Results in context: matches grouped by file, showing the matching line with highlighted text
  • Per-match actions: replace or dismiss individual matches
  • Click to navigate: click any match to open the file at that location

Usage

  1. Click the search icon in the ribbon, or run the command Batch Search & Replace: Open Batch Search & Replace
  2. Type your search term in the search field — results update as you type
  3. Use the toggle buttons to enable case sensitivity (Aa), whole word matching (ab), or regex mode (.*)
  4. Click the chevron (>) to reveal the replace input
  5. Expand files to include/exclude to filter by glob patterns (comma-separated)

File filter patterns

Patterns are comma-separated. Patterns without a / match against the filename; patterns with / match against the full path.

Pattern Matches
*.md All markdown files anywhere in the vault
chapters/*.md Markdown files directly in chapters/
chapters/**/*.md Markdown files anywhere under chapters/
chapters/** All files anywhere under chapters/
*.md, *.txt All .md and .txt files

Both / and \ are supported as path separators (Windows compatible).

Installation

From Obsidian Community Plugins

  1. Open Settings > Community plugins > Browse
  2. Search for "Batch Search & Replace"
  3. Click Install, then Enable

Manual installation

  1. Download main.js, manifest.json, and styles.css from the latest release
  2. Create a folder batch-search-replace inside your vault's .obsidian/plugins/ directory
  3. Copy the three files into that folder
  4. Restart Obsidian and enable the plugin in Settings > Community plugins

Development

# Install dependencies
npm install

# Development build (watch mode)
npm run dev

# Production build
npm run build

License

MIT

About

Batch search & replace plugin for Obsidian

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors