How to open 'Go to definition' in other split tab for same file in VS Code?

There are 2 ways to achieve this.

Either:

  1. Left-click function name that you want to open.
  2. Ctrl + t
  3. Ctrl + enter

Or:

  1. Change setting Editor > Goto Location: Multiple to be gotoAndPeek or goto
  2. Ctrl + Alt + [click on function name]

Both methods will open the definition in the split to the right (or create a new split if this is the right-most split).

You like?


The shortcut is Ctrl+K, F12 but this can be changed in the shortcuts (search for shortcut editor.action.revealDefinitionAside) More details here https://github.com/microsoft/vscode/issues/112136