13

Visual Studio Code has a "Go to symbol" command, which can go to either a variable name or a function. However what I usually want is to jump to a function name, so I'm wondering is there any command or shortcut to do this?

3 Answers 3

22

For jumping to function in currently opened file use Ctrl+Shift+O.

From docs:

You can navigate symbols inside a file with Ctrl+Shift+O. By typing : the symbols will be grouped by category. Press Up or Down and navigate to the place you want.

https://code.visualstudio.com/docs/editor/editingevolved#_go-to-symbol

8

In VSCode Ctrl+T shortcut put the focus on the dialog where you can type the name of the symbol you want to navigate to.

From VSDocs:

Key                          Command              Command id
⌘T (Windows, Linux Ctrl+T)  Show All Symbols     workbench.action.showAllSymbols

It relays on the support installed maybe via plugins. In order to navigate to symbols on a language, the support for that language must be installed. It works fine for me on Angular projects with Typescript symbols.

5

You can use : to classify symbols by type

Eg: @:your-function

Refered from https://stackoverflow.com/questions/60278165/vs-code-go-to-symbol-nowv1-42-showing-variables-object-and-properties-how-to
Added as answer as I can't comment

2
  • 1
    Welcome to Super User! Before answering an old question having other answers ensure your answer adds something new or is otherwise helpful in relation to them. Here is a guide on How to Answer. There is also a site tour and a help center. Please note the reference link quoted by @mimo is better than yours. Commented May 8, 2023 at 7:13
  • 2
    This answer was actually what I needed, but also I feel it answers the primary question properly, great find!
    – melfy
    Commented Oct 9, 2023 at 20:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .