Top 10 PyCharm shortcuts for Python learners

I love shortcuts. When there’s a frequently performed action, there’s got to be a shortcut to save me some time. In PyCharm there’s plenty of shortcuts to make one’s life easier.

keymap

Do you really need all of them? Probably not. I haven’t seen yet one person use ALL shortcuts available. That’s fine. Depending on what you do and how you do those things, your subset of useful shortcuts can vary. Some of the common routine tasks of a seasoned developer may be rare for someone who’s just learning. Naturally, there’s some overlap. For example, shortcuts for editing and search.

As I’m dabbling with Python, I thought I’d share my personal top 10 of shortcuts that I find can be already helpful to someone who’s just doing some learning. No advanced stuff.

  1. Cmd + N. Create a new file/directory/etc. I tend to create a lot of small code examples to try this and that, so this shortcut comes quite handy. Cmd + N
  2. Control + Shift + R: Run ‘this’. A fast way to run a small sample without the need to configure anything. Control + Shift + R
  3. Cmd + 1: Hide/Show Project bar. I like to hide the Project view so that the editor area is larger, but then sometimes I need it back.
  4. Alt + Enter: Show the list of available intention actions. Let PyCharm clean some of my mess :) Alt + Enter
  5. Cmd + /: Comment/uncomment a line, regardless where in the line the caret is positioned. A faster way to comment/uncomment a line, and I do a lot of it when experimenting with my code samples.
  6. Option + up/Option + down: Extend/Shrink selection. A faster way to select a logical block of code.
  7. F1: Quick documentation lookup. No need to google for documentation - it’s one keystroke away. F1
  8. Cmd + O: Find class by name. If I remember what it’s called.
    Cmd + O
  9. Cmd + E: Recent Files. Quick navigation to recent files and tool windows. Cmd + E
  10. Double-Shift: Search everywhere Double-Shift

I think these are the basic shortcuts that can be helpful to anyone, even those making their first steps. And these can already save you some time.

P.S.: Shortcuts depend on your system. I’m using the default OS X keymap. You can see yours in the Preferences.

Preferences