28

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?

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
GP89
  • 6,600
  • 4
  • 36
  • 64

4 Answers4

25

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

Mohamed Taher Alrefaie
  • 15,698
  • 9
  • 48
  • 66
Hauke
  • 2,554
  • 4
  • 26
  • 29
13

Breadcrumb bar just under editor

As of Pycharm 2017.02, there is a breadcrumb navigation under every editor window that shows information like:

ClassName > FunctionName > for i in range(): > if True:

You can also click to go to any of those points in the code.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
12

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.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • Thanks, I can't seem to find the Autoscroll from source option though? – GP89 Jul 23 '12 at 08:29
  • Ah thank you, I found it but its got its own button under Structure. Does exactly what I wanted as I usually have the structure pane open all the time. – GP89 Jul 23 '12 at 09:36
  • 1
    The File Structure view is quite clunky; is there no way to obtain a breadcrumb view in python, like one has when editing XML/HTML (ie http://www.jetbrains.com/pycharm/webhelp/navigating-with-breadcrumbs.html) ? I can't find any information about this, which is a bit baffling; surely it's possible to implement, otherwise the File Structure view would also be impossible to implement. – gamen Jul 30 '14 at 08:39
  • I think it is now called "Always select opened element" (instead of Autoscroll from source) under Structure that highlights the current method in the Structure pane. – omsrisagar Mar 09 '23 at 22:16
1

For mac it is: Ctrl + Shift + q.

valex
  • 5,163
  • 2
  • 33
  • 40