Reading and understanding code is mostly navigation; doing it by keyboard keeps you in flow.
Search across files with Ctrl+Shift+F. The search box supports match case, whole word and regex toggles, and the "..." toggle reveals files to include and files to exclude globs, such as src/**/*.ts or !**/*.test.ts. Files ignored by .gitignore and the search.exclude setting are skipped by default. Ctrl+Shift+H opens replace, previewing each change as a diff before you apply it; with regex on, $1 refers to capture groups.
Code navigation, powered by the language service:
F12goes to definition,Ctrl+Clickdoes the same with the mouse.Alt+F12peeks the definition inline without leaving your place.Shift+F12lists all references;Shift+Alt+F12shows them in the References view.Ctrl+Shift+Ogoes to a symbol in the file,Ctrl+Tto a symbol in the workspace.F8jumps to the next error or warning.
After jumping, Alt+Left on Windows (Ctrl+- on macOS, Ctrl+Alt+- on Linux) goes back to where you were, and the matching forward shortcut returns, like a browser. The breadcrumbs bar above the editor shows the file path and symbol path; click any part to navigate siblings.
Ctrl+F and Ctrl+H are find and replace in the current file, with the same regex support.
Example
# Ctrl+Shift+F search in files
# query: TODO|FIXME (regex enabled)
# include: src/**/*.ts
# exclude: **/*.test.ts
# Ctrl+Shift+H replace in files
# find: console\.log\((.*)\)
# replace: logger.debug($1)
# F12 go to definition Alt+F12 peek definition
# Shift+F12 find references Ctrl+T workspace symbol
# Alt+Left navigate back F8 next problemRemember
- Ctrl+Shift+F with regex and include/exclude globs
- F12 definition, Alt+F12 peek, Shift+F12 references
- Navigate back after a jump; F8 cycles problems
Watch out for
- Wondering why a file is missing from search results; it may be excluded by .gitignore or search.exclude.