Skip to content
Advertisement

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

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?)

Advertisement

Answer

You navigate to the top of the file using Ctrl+Home. It moves cursor too. So does navigating via Page Up and Page Down keys.

Ctrl+Up and Ctrl+Down move the view without moving cursor but scrolling the long file takes some time.

Additionally You can change the keymap (Settings > Keymap). There is ‘Scroll to Top’ in ‘Editor Actions’. You can use Your own key binding for this action, by default (in PyCharm 4 and later) it is not set.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement