IntelliJ IDEA shortcut for Extract/Introduce Local Variable
In IntelliJ IDEA, Ctrl + Alt + V for Windows/Linux and ⌘⌥V for macOS is the shortcut key to extract the highlighted or selected code into a local variable.
Similar Post: Shortcut key for Extract Local Variable in Eclipse/STS
Select the piece of code that you want to introduce a local variable name or put your mouse pointer at the end of the code,
And press Ctrl + Alt + V (Windows/Linux) or ⌘⌥V (macOS) button together, IntelliJ IDEA automatically assigned a local variable for that code snippet.
References
- IntelliJ IDEA- Import/Open multiple project in single Window
- IntelliJ IDEA– Remove/Optimize unused imports shortcut keys
- IntelliJ IDEA – Code reformat and rearrange shortcut keys