Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out which class I'm currently in in Pycharm?

Tags:

A rather simple question that I'm sure there's an answer to, I just can't seem to find it by searching

Sometimes I'm looking at or writing some code I want to double check or find out which class I'm in, is there an easier way I can find out without scrolling up to the class line?

like image 290
GP89 Avatar asked Jul 21 '12 19:07

GP89


People also ask

How can I see the code of a module in PyCharm?

If the file is opened in the editor, press Alt+F1 to open the Select In popup. In the popup, select Project View and press Enter . PyCharm locates your target in the Project tool window.

How can I see all functions in PyCharm?

By default, PyCharm shows all classes, methods, and other elements of the current file. To toggle the elements you want to show, click the corresponding buttons on the Structure tool window toolbar. to show class fields.

Does PyCharm use spaces instead of tabs?

Just ot note: Pycharm's to spaces function only works on indent tabs at the beginning of a line, not interstitial tabs within a line of text.


2 Answers

Try ALT+Q, or Mac: Ctrl + Shift + Q for Mac as described in the PyCharm docs

like image 114
Hauke Avatar answered Sep 20 '22 15:09

Hauke


Navigate | Select In... | Project View or File Structure, or you can keep Project or Structure view visible with the Autoscroll from Source option enabled.

It's also possible to use Navigate | File Structure for a pop-up showing your current position.

like image 32
CrazyCoder Avatar answered Sep 21 '22 15:09

CrazyCoder