Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I go to symbol across python files in Visual Studio Code

Essentially I want to be able to do the following https://code.visualstudio.com/docs/editor/editingevolved#_open-symbol-by-name in a python workspace in visual studio code.

It returns No symbols matching when attempting to search. Any way to get this working?

like image 518
John Mike Avatar asked May 10 '17 22:05

John Mike


1 Answers

There used to be an issue but it seems to be fixed now, it works for me. For people stumbling upon this question wondering how to look for symbols across files, use the Open symbol by name feature.

  1. From the command palette cmd/ctrl + shift + p > Go to Symbole in Workspace...
  2. Starting the command with # cmd/ctrl + shift + p > # my_symbol
  3. Using the default keybinding ctrl/cmd + T
  4. Overwrite the default keybinding
  5. Include symbol search in Quick Open: "search.quickOpen.includeSymbols": true

Example using keybinding:

screenshot of keybinding

https://code.visualstudio.com/Docs/editor/editingevolved#_open-symbol-by-name

like image 141
ted Avatar answered Oct 19 '22 10:10

ted