Comment Lines & Blocks of Code
IntelliJ IDEA
Keyboard Shortcuts
IntelliJ IDEA offers multiple ways to comment lines and blocks of code, making it convenient for developers. For line comments, press Ctrl
(Windows/Linux) or Cmd
(macOS) + /
. To comment a block of code, press Ctrl
(Windows/Linux) or Cmd
(macOS) + Shift
+ /
.
Customizing Shortcuts
Furthermore, IntelliJ IDEA allows users to customize these shortcuts according to their preferences. To do so, go to "File" > "Settings" > "Keymap" and search for "Comment with Line Comment" or "Comment with Block Comment" to assign the desired shortcuts.
Komentar