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 |