Search and Replace Keyboard Shortcuts Across Editors and IDEs
Master find and replace shortcuts in VS Code, IntelliJ, Chrome, and system-wide with regex support, scope controls, and batch replacement techniques.
Detailed Explanation
Search and Replace Shortcuts
Search and replace is one of the most frequently used operations in software development. Every editor and application has its own variant, but the patterns are remarkably consistent.
Universal Pattern
Almost every application follows this convention:
- Find (
⌘+F/Ctrl+F) — open the find dialog - Find and Replace (
⌘+H/Ctrl+Hor⌘+⌥+F) — open find and replace - Find Next (
⌘+G/F3orEnter) — jump to next match - Find Previous (
⌘+Shift+G/Shift+F3) — jump to previous match
VS Code Specifics
- Find in File (
⌘+F/Ctrl+F) — search within the current file - Replace in File (
⌘+⌥+F/Ctrl+H) — find and replace in the current file - Search All Files (
⌘+Shift+F/Ctrl+Shift+F) — project-wide search - Replace All Files (
⌘+Shift+H/Ctrl+Shift+H) — project-wide replace - Toggle Regex (
⌘+⌥+R/Alt+R) — enable regex mode in the search dialog - Toggle Case (
⌘+⌥+C/Alt+C) — toggle case sensitivity - Toggle Whole Word (
⌘+⌥+W/Alt+W) — match whole words only
IntelliJ Specifics
- Find in File (
⌘+F/Ctrl+F) - Replace in File (
⌘+R/Ctrl+R) - Find in Path (
⌘+Shift+F/Ctrl+Shift+F) — project-wide search with scope filtering - Replace in Path (
⌘+Shift+R/Ctrl+Shift+R) — project-wide replace - Structural Search — IntelliJ's unique feature that searches by code structure, not just text
Browser Search
- Find in Page (
⌘+F/Ctrl+F) — works in every browser - Find Next (
Enteror⌘+G) — jump between matches - Close Find (
Esc) — dismiss the find bar
Regex Tips
When regex mode is enabled in your editor:
\b— word boundary (match whole words)(group)— capture group, reference with$1in replacement.*?— non-greedy match^/$— start and end of line\n— newline in search (VS Code multiline search)
Use Case
Search and replace shortcuts are used constantly during refactoring, data transformation, and codebase migrations. Regex-powered search and replace can accomplish in seconds what would take minutes with manual editing. Project-wide replace is essential when renaming APIs, updating configuration values, or migrating import paths.