Frequently used Keyboard shortcuts in Intellij / Pycharm

ยท 302 words ยท 2 minute read

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