MD Search
VSCode extension for nested code search and replace functionality

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:
- Open VSCode
- Go to Extensions view (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "md-search"
- Click "Install"
Manual Installation
For manual installation:
- Download the latest
.vsix file from the Releases page
- Run:
code --install-extension path/to/md-search-x.x.x.vsix
Usage
- Open the Search panel from the Activity Bar
- Enter your search query
- Optionally configure search settings:
- Search mode (text, regex, astx)
- Include/exclude patterns
- Case sensitivity
- Search in results
- Review matches in the results panel
- Enter replacement text if needed
- Preview changes before applying
- 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.
- 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
- Search only in source and test folders:
files to include: src, test
- Exclude node_modules and build output:
files to exclude: node_modules, dist, out
- 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) |
Command |
Description |
Ctrl+Shift+F |
Cmd+Shift+F |
Find |
Opens the search panel and focuses the find input |
Ctrl+Shift+H |
Cmd+Shift+H |
Replace |
Opens the search panel and focuses the replace input |
Ctrl+Shift+C |
Cmd+Shift+O |
Copy All Matches |
Copies all found matches to clipboard, separated by newlines |
Ctrl+Shift+X |
Cmd+Shift+X |
Cut All Matches |
Cuts all found matches and copies them to clipboard |
Ctrl+Shift+V |
Cmd+Shift+V |
Paste to All Matches |
Replaces all found matches with clipboard content |
Ctrl+Shift+Z |
Cmd+Shift+Z |
Revert |
Returns 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:

