Search code examples
android-studiointellij-idea

Is there a way to show the "select template" pop-up for a code selection without using the keyboard shortcut?


I'm using Android Studio, but this would probably apply to any IntelliJ-based IDE. According to the documentation, you can select code and press Ctrl+Alt+J to show the "select template" pop-up and apply a template to the highlighted code. This works, but I hate having to remember keyboard shortcuts, especially as they may differ when working on colleagues' machines depending on how they set up their keymap. I could not find a way to display this pop-up without using the keyboard shortcut - I've been unable to find it in any of the menus, the toolbar, or the right-click context menu. Is there a way to show this pop-up just using the mouse?


Solution

  • You could use Code | Surround With menu item. This action will pop up a list containing the "surround" Live Templates after the built-in surround actions.