Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>MagicSearchNew to Visual Studio Code? Get it now.
MagicSearch

MagicSearch

Roki

|
2 installs
| (0) | Free
multi search and highlight tool for VSCode
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MagicSearch

Advanced Multi-Search & Highlight Tool for VSCode

A powerful search extension that enables multiple simultaneous searches with color-coded highlighting for each search pattern.

✨ Key Features

🔍 Multi-Search

  • Multiple search patterns running simultaneously
  • Unique colors for each search pattern
  • Real-time search: Auto-update results during file editing
  • Fast response with optimized memory efficiency

🎯 Quick Search

  • Context menu search: Select text → Right-click → "Start Magic Search"
  • Command palette: Ctrl+Shift+P → "MagicSearch: Start Magic Search"
  • Auto-section creation with instant search execution

🎨 Highlight Features

  • Custom colors: Assign any color to each search pattern
  • All files supported: Highlights across all open files
  • State persistence: Search state maintained after tab switching
  • Auto-update: Real-time highlight and result updates during code editing

🔄 Replace Features

  • Single replace: Replace current focused occurrence
  • Replace all: Batch replace all matches
  • Cross-file: Bulk replacement across multiple files

🚀 How to Use

Basic Search

  1. Click the MagicSearch icon in the sidebar
  2. Enter search text in the search box
  3. Press 🔍 button or Enter key to execute search
  4. Use ↑↓ buttons to navigate between results

Context Menu Search (Recommended)

  1. Select text in the editor
  2. Right-click → "Start Magic Search"
  3. New section is added and search starts immediately
  4. Text is highlighted with a random color

Multi-Search

  1. Click + button to add new search section
  2. Set different search patterns for each section
  3. Each pattern is highlighted with a different color

Replace Operations

  1. Click ⮟ button to show replace UI
  2. Enter replacement text
  3. Execute single replace or replace all

🔧 Search Options

Button Feature Description
Aa Case Sensitive Match case exactly
[ab] Whole Word Match whole words only
.* Regular Expression Use regex patterns
▼ Replace Enable replace mode
三 Range Search Search within selection
📄 Tabs Only Search only in opened tabs (faster)
🌐 Project Mode Search entire project

📁 File Filtering

Include/Exclude Patterns

  • Include: *.ts,*.js - Search specific files only
  • Exclude: node_modules,dist - Exclude specific files/folders
  • Press Enter to apply filters

Recommended Patterns

Include: *.ts,*.tsx,*.js,*.jsx
Exclude: node_modules,dist,build,coverage,.git

🔄 Real-time Search

MagicSearch automatically updates search results during file editing.

Example

  1. Execute search for "break" keyword
  2. Add new "break" in the editor
  3. Search results update automatically and new line is highlighted

Features

  • Debounce processing: 500ms wait to reduce unnecessary searches
  • Memory efficient: Re-search only modified files
  • Background operation: Lightweight design that doesn't interfere with editing

⌨️ Keyboard Shortcuts

Shortcut Action
Alt+Shift+M Start Magic Search with selected text
Enter Execute search (highlight only)
Enter in replace box Execute single replace
Enter in filter box Apply filter and search

Customizing Shortcuts

Open keyboard shortcuts settings with Ctrl+K Ctrl+S and search for "Start Magic Search" to customize the keybinding.

🎯 Common Use Cases

Code Review

  • Select variable/function name and right-click search
  • Highlight multiple elements with color coding

Debugging

  • Select error message to identify related locations
  • Search multiple log levels simultaneously

Refactoring

  • Search target elements to check impact scope
  • Efficient renaming with bulk replace

API Exploration

  • Select method name to find usage locations
  • Cross-search library features

💡 Performance Tips

Real-time Search Optimization

  • Debounce: Wait 500ms after file edit before re-searching
  • Differential updates: Update UI only when match count changes
  • Document cache: Avoid duplicate file reads
  • Batch processing: Efficiently process multiple files in parallel

Large Projects

  • Use 📄 Tabs Only mode (default)
  • Actively use Include/Exclude patterns
  • Real-time search targets only opened files

Enjoy efficient searching with MagicSearch! 🚀

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft