1. Prepare a project
Add a python file to your project and enter some source code, for example:
2. Go to corresponding file, class, symbol
One of the most powerful features Pycharm provides is the ability to jump to any file, class, or symbol where it is defined by name.
3. Jump to File
Press the Ctrl+shift+n shortcut key to enter D in the popup window:
The drop-down list shown below contains all files with the letter D in the name. Here choose deeplyburiedfile.py, enter, open the corresponding deeplyburiedfile.py file:
4. Jump to Class
Next we try to jump to a specific class definition. Press CTRL + N, enter O, note here you can enter * to represent all the file names. In the drop-down list, all classes with the letter O in the name are listed, and the corresponding full path is given:
Select Foo in the Cue list, enter this time to open the file at the class declaration where the cursor is located:
5. Jump to Symbol
Next we try to jump to a specific member of the class. Press Ctrl+alt+shift+n to enter a:
Select Bar, then enter to go to the corresponding definition:
6. Additional function of Jump window
You may notice that there are other controls in the popup window that provide additional functionality for us.
First, we show you how to jump to files, classes, and symbols outside of the current project. Tick the Include non-project files/classes/symbols check box or press the relevant shortcut key to open the list of external prompts. Unlike the previous suggestion list, this listing contains the corresponding items in the external library that match the search criteria:
The next step is to display the current multi-match entry in a separate Window Find tool window, which becomes important when you are doing multiple searches. We also want to be able to save our search results for the next visit:
Finally, you can specify what type of search results you currently want to display by clicking the funnel icon next to the cue list:
Most complete Pycharm tutorials (--pycharm) search navigation file name, symbol name search