wikis / VS Code / wiki / concepts / refactoring-and-navigation.md view as markdown report a mistake
Refactoring & Code Navigation
Navigation
- Go to Definition (
F12) / Peek Definition (Alt+F12) โ jump to or inline-view where a symbol is defined. - Go to References / Find All References โ every usage of a symbol.
- Go to Symbol (
Ctrl+Shift+O) in a file, or across the workspace (Ctrl+T). - Go to File (
Ctrl+P) โ fuzzy quick-open. - Breadcrumbs and the Outline view for structural navigation.
- Back/Forward navigation through your jump history.
Refactoring
VS Code exposes language-server refactorings via the Refactor menu / lightbulb code actions:
- Rename Symbol (
F2) โ rename across all references safely. - Extract method/function/variable/constant.
- Move to a new file, inline, and other language-specific refactors.
- Quick Fixes for diagnostics (add import, implement interface, etc.).
Available refactorings depend on the language extension.
Search & glob patterns
The Search view does workspace-wide find/replace (regex supported). Scope it with glob patterns in files.include/files.exclude and search.exclude settings: **/*.ts (all TS files), **/node_modules (exclude), {a,b} brace expansion. The same glob syntax governs file watching, file associations, and many extension configurations โ learning it pays off across the editor.
