When you open a file in VS Code and you look for a specific function, class, ... you can navigate by symbols. Press
Cmd+Shift+O on macOS) to see all symbols of the current file. You can filter the list and navigate through the results with arrow down / arrow up. VS Code will automatically scroll to the focused element. Press
esc to close the list (and navigate back to the original scroll position) or
enter to focus that symbol.