In PyCharm, how to navigate to the top of the file?

Viewed 8844

I'm new to PyCharm and haven't been able to figure out what I'm sure is a very simple thing -- what's the key stroke to go to the top of the current file?

(Bonus question -- is there a way to scroll to the top of the current file without moving the cursor there also, a la the Home key in Sublime Text 2?)

3 Answers

Another way is to navigate to the first line using goto line: Ctrl-G and then 1. But this will move the cursor to the first line.

A small disadvantage is it is a two step process and adds a navigation step. Moving back to your previous location with CtrlAlt-< will have to be done in two steps if you do an edit.

In mac, Command + Home will go to the top of file

Related