My go-to editor for python development is VSCode. However, there were a few times where I used to waste a lot of time in fixing silly mistakes, particularly while calling the methods or variables of an object. I noticed that when we invoke a wrong method call for an object, vs-code doesn’t hightlight it. It highlights only the incorrect methods, variables or modules in the local namespace.
So, I tried to give pycharm a try. However, I soon realised the common keyboard shortcuts that were on my fingertips in VSCode and which made my development easier were needed in pycharm too. This is a post where is list down some of the shortcuts that I use frequetly. I listed it down here so that I can refer to this in the future.
Note:
Pycharm is developed by Intellij. So these shortcuts will remain common for all the IDEs created by Intellij
Open files / dialogs
Command |
Description |
⌘ E |
Open Dialog contaning the list of recently opened files |
fn ⌥ 9 |
Open / Toggle git tool window |
fn ⌥ f12 |
Open / Toggle terminal emulator |
Navigation in File
Command |
Description |
fn ⌘ ← |
Go to the top of the file |
fn ⌘ → |
Go to the end of the file |
⌃ G |
Select the current / next word under the cursor |
⌃ ⇧ G |
Unselect the next occurence |
⌃ ⌘ G |
Select all occurrences |
⌘ G |
Go to next occurence |
⌘ L |
Go to line |
Navigation in Project
Command |
Description |
⌘ B |
Go to definition |
⌥ ⌘ ← |
Go back to the previous cursor location |
⌥ ⌘ → |
Go forward to the previous cursor location |
fn ⌥ f7 |
Find usage of the word under the cursor |
Add code
Command |
Description |
fn ⌥ ↩ |
Import name under the cursor |