🔍 Lesson 8 of 40 Editor Features Beginner

Search, Find & Replace Across Files

VS Code's search capabilities are fast and flexible. From quick in-file find to full regex workspace search with preview, this lesson covers every search scenario.

20% complete

1Find in the Current File

Press Ctrl+F to open the Find widget. Features include: case-sensitive toggle, whole-word match, and regular expressions. Use F3 / Shift+F3 to cycle through matches. Press Alt+Enter to select all matches at once for multi-cursor editing.

2Find & Replace in File

Press Ctrl+H to open Find & Replace. Type your search term, then the replacement. Use Ctrl+Alt+Enter to replace all. Tick the regex button (Alt+R) to use capture groups: ($1) style replacements.

Regex replace example — rename function
Find:    function (\w+)\(
Replace: const $1 = (

3Workspace-Wide Search

Press Ctrl+Shift+F to search across your entire workspace. Results appear grouped by file with full context lines. Click any result to jump to it. Use the include/exclude boxes to target specific file globs:

Include / exclude patterns
Include:  src/**/*.ts
Exclude:  **/node_modules, **/dist

4Workspace-Wide Replace

Switch to the Replace panel inside the Search sidebar. Preview all changes before applying — each file shows a diff of what will change. Replace file-by-file or all at once.

5Search Editors

Open a Search Editor (Ctrl+Shift+PSearch Editor: Open New) to get a full-size, persistent view of search results. You can edit results directly in the search editor and save the search for later. Great for large refactoring sessions.

💡 Tip: Use editor.find.seedSearchStringFromSelection to pre-fill the search box with your current selection automatically.

All 40 Lessons
Pick any lesson to jump straight to it.
L01
Getting Started with VS Code
FoundationBeginner
L02
The VS Code Interface & Layout
FoundationBeginner
L03
Installing & Managing Extensions
ExtensionsBeginner
L04
Keyboard Shortcuts & Command Palette
ProductivityBeginner
L05
Settings, Themes & Customization
CustomizationBeginner
L06
IntelliSense & Code Completion
Editor FeaturesBeginner
L07
Integrated Terminal Mastery
ProductivityBeginner
L08
Search, Find & Replace Across Files
Editor FeaturesBeginner
L09
Git & Source Control with VS Code
Version ControlBeginner
L10
Snippets & Emmet Abbreviations
ProductivityBeginner
L11
GitHub Copilot — Getting Started
AI & CopilotIntermediate
L12
Copilot Chat & Inline Ask
AI & CopilotIntermediate
L13
JavaScript & TypeScript Development
LanguagesIntermediate
L14
Python Development in VS Code
LanguagesIntermediate
L15
Debugging Like a Pro
DebuggingIntermediate
L16
Linting, Formatting & ESLint
Code QualityIntermediate
L17
Multi-Cursor Editing & Refactoring
Editor FeaturesIntermediate
L18
Workspaces & Multi-Root Projects
WorkspaceIntermediate
L19
Tasks, Build Systems & npm Scripts
WorkflowIntermediate
L20
Testing with Jest, Vitest & Pytest
TestingIntermediate
L21
React Development Workflow
Web DevIntermediate
L22
Node.js & Express in VS Code
BackendIntermediate
L23
Docker & Dev Containers
DevOpsIntermediate
L24
Live Share — Real-Time Collaboration
CollaborationIntermediate
L25
Jupyter Notebooks in VS Code
Data ScienceIntermediate
L26
REST Client & API Testing
API DevIntermediate
L27
SSH Remote Development
Remote DevIntermediate
L28
WSL 2 Integration on Windows
Remote DevIntermediate
L29
Advanced Debugging: Breakpoints & Watch
DebuggingAdvanced
L30
Copilot Agent Mode — Agentic Workflows
AI & CopilotAdvanced
L31
Profile & Performance Optimisation
PerformanceAdvanced
L32
GitHub Actions & CI/CD Integration
DevOpsAdvanced
L33
Custom Keybindings & Key Maps
CustomizationAdvanced
L34
Settings Sync & Dotfiles Management
WorkflowAdvanced
L35
Language Server Protocol (LSP) Explained
InternalsAdvanced
L36
Rust Development in VS Code
LanguagesAdvanced
L37
Go Development in VS Code
LanguagesAdvanced
L38
GitHub Codespaces & vscode.dev
Remote DevExpert
L39
Writing Your First VS Code Extension
Extension DevExpert
L40
Pro VS Code Workflow & Mastery
MasteryExpert