Can I please configure right-click menu options?


When I highlight code, I usually use the mouse.

A couple of often-used items I like to then have available on the right-click, right after highligting code, are:

1. Comment line or block

2. Surround with

Yet, neither of these is on the (default) IDEA right-click menu.

So, I either need to move my mouse to the menu or dig out the keyboard shortcut cheat-sheet.

My question is then, is there a way I configure what is on the right-click menu when it's in a code file?

If there isn't a way to configure the right click menu options, can this feature be added?

Thanks in advance,

- m


You can customize the menu under Settings | Menus and Toolbars.


Hi Dimtry,

I looked through the menus but didn't see one that matched what is shown when you right-click in a code window.

Also, when I just picked a menu to see what was available, I didn't see the comment options (or surround with options.

Which menu do I need to modify here?



Hi Mork,

Which menu do I need to modify here?

You need Editor Popup Menu

You will definitely benefit from learning shortcuts -- much faster compared to mouse-involved route. Yes -- it will take some time to learn shortcut for a command that you use not that often. For this, of course, you would need to use IDE for a while...

Plus .. if you start putting a lot of items into context menu, it will grow big, sometimes even way to big  (it's already quite big in with default settings) that you may need to move mouse cursor in opposite part of the screen.

In any case -- you can always try adjusting keymap to you needs -- for example for commands that involve 3 or even 4 keys to be pressed.


Thanks, it works perfectly.

I'm trying to learn all the shortcuts, but with all the applications that use shortcuts, it takes time. :)

- m


For future reference: For quickly finding actions that you don't know the keyboard mapping for you can also use Ctrl-I, "Find Action".


>For future reference: For quickly finding actions that you don't know the keyboard mapping for you can also use Ctrl-I, "Find Action".

Ctrl+I ?

You must be using NetBeans keymap or something... as for me it's Ctrl+Shift+A. Therefore it's better to also mention the action name (how to find it) to avoid "I'm pressing Ctrl+I but it does noting/does different thing" situations.

P.S. It's  "Help | Find Action..."


Update:     Editor (right-click) context menu / popup menu settings are now under:


Settings  >  Appearance and Behavior  >  Menus and Toolbars  

  >  Editor Popup Menu


I love the fact we can order the menus as needed, but honestly I think Quick Definition should be the second in the list and not somewhere at the bottom of the list. Apart maybe from the Show Context Actions, I think Quick Definition is the most important item in the list. In addition, this is how VS does it too, so, I think there is a rationale behind it.


Please sign in to leave a comment.