IntelliJ Tips and Tricks

I’m using VS Code for my private projects and IntelliJ at work. Coming from Eclipse, I’ve never really took the time to check out all the features of IntelliJ, instead I just started using it and learned as I went along. As soon as I knew how to do all the things I needed for my daily job, I settled and didn’t make any effort to further optimise my workflow and productivity. The things I knew were just good enough to get the job done, but I wasn’t very efficient. When I did pair programming with colleague recently, I saw that he was much faster as he really used the IDE to help him achieve what he wants. I decided that it’s a very good investment to spend a few hours learning the power of IntelliJ. I came across this video, which is very entertaining and funny to watch. Hadi Hariri┬ásays he’s happy when you learn 3 new things – well, for me I only knew about 3 tricks out of his 42 tips and tricks. As the pace is pretty fast I’m listing down the most important things, so I won’t forget them and can double check every once in a while to see if I’m using all the good stuff.

You can jump to any section of the video by clicking the links in the comments.

Here’s what I will use on daily basis:

Shift + Shift Search Everywhere. Search for anything, everywhere. Use tab so jump to the next category and left arrow key to go back in the history.
Cmd + , --> Tabs --> Placement: NoneTurn off tabs. Tabs are the most inefficient way of navigation.
Cmd + E or Shift + ShiftRecent files. Use recent files for navigation.
Shift + Cmd + ERecently edited files.
Cmd + 1 Toggle project window. Just type to search through the project window.
Ctrl + TabSwitch between the two last used files
Shift + Cmd + OOpen file.You can also jump to a specific line (i.e. or access directories (i.e. /src/app/).
Cmd + NCreate a new file directly where you are. When you create new directory, just type dir1/dir2/dir3/
Shift + Cmd + F12Hide all the windows. If you even need more space, use distraction free mode. If you are presenting something then use presentation mode.
Alt + upSelect the word, the method, class, file and so on.
Shift + Cmd + VGet your clipboard back including the history.
Right click of preferences in project window and activate autoscroll to sourceUsing autoscroll to source, will make sure that you always know where you are in the project when you navigate from a file.
Cmd + YDelete a line.
Cmd + DDuplicate a line.
Ctrl + Cmd + GSelect multiple words and change them all at once.
Ctrl + Alt + IReformat code
Cmd + Shift + A --> Check RegExpCheck a regular expression.
Ctrl + Shift + SpaceSmart completion
Alt + /Hippie completion. Find everything that matches what you types so far.
Shift + Cmd + ATest restful webservice. Opens up a tool window where you can invoke GET, PUT, POST, DELETE requests.
Right click on a breakpoint, click on moreAdds full power to your breakpoints.
Help --> Productivity GuideSee what you use and how many times you've used it.

Let me know about your favourite short cuts and productivity boosters.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *