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.
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.
- 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.
- Control + Shift + R: Run ‘this’. A fast way to run a small sample without the need to configure anything.
- 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.
- Alt + Enter: Show the list of available intention actions. Let PyCharm clean some of my mess :)
- 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.
- Option + up/Option + down: Extend/Shrink selection. A faster way to select a logical block of code.
- F1: Quick documentation lookup. No need to google for documentation - it’s one keystroke away.
- Cmd + O: Find class by name. If I remember what it’s called.
- Cmd + E: Recent Files. Quick navigation to recent files and tool windows.
- Double-Shift: Search everywhere
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.