---
title: "Refactoring & Code Navigation"
type: concept
tags: [refactoring, navigation, search, symbols]
updated: 2026-06-19
confidence: high
sources: [raw/github_doc-docs-editing-refactoring-md.md, raw/github_doc-docs-editing-tips-and-tricks-md.md, raw/github_doc-docs-editor-glob-patterns-md.md]
---

# 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](extensions.md).

## 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](settings-and-sync.md): `**/*.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.
