MD Search

January 26, 2026 ยท View on GitHub

VSCode extension for nested code search and replace functionality

Screenshot

Download MD Search

Features

  • Powerful search and replace in found matches
  • Multiple search modes: text, regex, and structural search
  • Live preview of search results
  • Support for code transformations in found matches
  • Filter results by file or pattern

Deep Dive: Want to master regex & capture groups? Check out our Advanced Search & Regex Guide.

Installation

From Marketplace

You can install this extension directly from the Visual Studio Code Marketplace:

  1. Open VSCode
  2. Go to Extensions view (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "md-search"
  4. Click "Install"

Manual Installation

For manual installation:

  1. Download the latest .vsix file from the Releases page
  2. Run: code --install-extension path/to/md-search-x.x.x.vsix

Usage

  1. Open the Search panel from the Activity Bar
  2. Enter your search query
  3. Optionally configure search settings:
    • Search mode (text, regex, astx)
    • Include/exclude patterns
    • Case sensitivity
    • Search in results
  4. Review matches in the results panel
  5. Enter replacement text if needed
  6. Preview changes before applying
  7. Apply changes to selected files

Included and Excluded Files

You can filter which files to search using "File to Include" and "Files to Exclude" fields.

Format

  • Comma-separated values: You can specify multiple patterns by separating them with commas.
    • Example: src, test (will search in both src and test folders)
  • Root-relative paths: Paths are relative to your workspace root.
    • To include a specific folder, write its path: frontend/components
    • To match file types, use standard globs: *.ts, *.tsx

Examples

  1. Search only in source and test folders:
    files to include: src, test
    
  2. Exclude node_modules and build output:
    files to exclude: node_modules, dist, out
    
  3. Search only TypeScript files in a feature folder:
    files to include: src/features/search/*.ts
    

Note: The exclusion patterns work on top of your .gitignore settings if you have Git integration enabled.

Keyboard Shortcuts

The extension includes several helpful keyboard shortcuts to enhance your workflow:

Shortcut (Windows/Linux)Shortcut (macOS)CommandDescription
Ctrl+Shift+FCmd+Shift+FFindOpens the search panel and focuses the find input
Ctrl+Shift+HCmd+Shift+HReplaceOpens the search panel and focuses the replace input
Ctrl+Shift+CCmd+Shift+OCopy All MatchesCopies all found matches to clipboard, separated by newlines
Ctrl+Shift+XCmd+Shift+XCut All MatchesCuts all found matches and copies them to clipboard
Ctrl+Shift+VCmd+Shift+VPaste to All MatchesReplaces all found matches with clipboard content
Ctrl+Shift+ZCmd+Shift+ZRevertReturns to previous state, buffer size is 1 step

The copy/cut/paste operations work with multiple matches at once, allowing you to:

  • Copy hundreds of matches with a single keystroke
  • Cut multiple occurrences across files and paste them elsewhere
  • Replace multiple occurrences with either single or multiple values from the clipboard

These shortcuts are active when the search panel has focus.

Note: If keyboard shortcuts don't work, they might conflict with shortcuts from other extensions. You can customize them in VS Code's Keyboard Shortcuts settings (File > Preferences > Keyboard Shortcuts).

Performance Note: When working with a large number of files or matches, operations like Copy All Matches, Cut All Matches, or Paste to All Matches may experience a slight delay. This is normal as the extension processes all matches across multiple files.

Requirements

  • Visual Studio Code 1.60.0 or higher

Support Me:

If you find this extension useful, please consider donating to support its development:

Buy Me A Coffee

Donate with Ethereum