- Ctrl + / => comment or uncomment a line -> //
- Ctrl + shift + / => comment or uncomment block of code -> /**/
- Ctrl + y => delete a line.
- Ctrl + d => duplicate a line.
- How do I comment out in IntelliJ?
- How do you hotkey a comment?
- How do I set hotkeys in IntelliJ?
- What is the shortcut to comment out code?
How do I comment out in IntelliJ?
Comment out a line or selection of code. If you want to temporarily comment out a section of code, you can do so by first selecting the section (remember to use Ctrl + W / Shift + Ctrl + W) and then hitting Ctrl + /. If you want to comment out the current line of code, simply hit Ctrl + / too — no selection needed.
How do you hotkey a comment?
If you select a block of code and use the key sequence Ctrl+K+C, you'll comment out the section of code. Ctrl+K+U will uncomment the code.
How do I set hotkeys in IntelliJ?
Configure keyboard shortcuts IntelliJ IDEA includes several predefined keymaps and lets you customize frequently used shortcuts. To view the keymap configuration, open the Settings/Preferences dialog Ctrl+Alt+S and select Keymap. IntelliJ IDEA automatically suggests a predefined keymap based on your environment.
What is the shortcut to comment out code?
On Windows 10 you can use CTRL + to comment/uncomment on any line or block of code. 1. Select the text, Press Cntl + K, C to comment (Ctr+E+C ) 2.