Tips & Tricks

Quick Lists to Group Your Favorite Actions

There’s a lot of useful actions in IntelliJ IDEA that don’t have shortcuts for many different reasons: they’re not used too often or there’s simply no more convenient key combinations left.

For example, I often want to get access to VCS actions like Compare with latest repository version or Revert current file or even submit a single file with a quick NPE fix without opening a menu or going to Changes view.

So how can I call any of these actions with a single shortcut? That’s really easy: I just need to define my own Quick List and map it to a shortcut (Control-X in my case). After I’ve done that, every time I press Control-X I will get a pop-up like this:

Quick List in action

Quick List in action

Now I can press 5 to quickly commit the current file or 2 to revert all my changes. OK, now let’s see how to create a Quick List and assign it a shortcut.

First of all, you should decide which actions to include in the list. Think how often you call a context menu or, say, go to Changes view to perform a single action. If you can’t recall a pack of useful actions right away, don’t worry: you’ll be able to extend your list anytime later.

Now, choose File | Settings and choose Quick Lists from the list of available categories:

Filling a Quick List with actions

Filling a Quick List with actions

Now, press + (Add) button in the top left corner of the dialog box, and assign a name to your list (my list is called ‘spl’ for no particular reason: I just like to give my customizations unique names). Browse available actions on the left and move them into your list with the right arrow button, reorder them, etc.

Added a few items? Take a break before you go further: it’s a good practice to keep the list short in order to access its items by numbers from 1 to 9.

Now, assign a shortcut to the Quick List. To do that, choose Keymap from the left configuration pane and expand the Quick Lists item:

Choosing a shortcut for a Quick List

Choosing a shortcut for a Quick List

You’ll notice your Quick List there, so just assign an unused shortcut to it.

That’s all. Now if you press the shortcut that you’ve assigned to your Quick List, you’ll see a small pop-up list with your selected actions.

Hope it will save you a couple of seconds every now an then so that you can concentrate on what you’re doing instead of how to do it!

image description