When I use the default commenting shortcut in IntelliJ (cmd +
/) it inserts the
// comment line at the first position of the line like so:
Is there a way to modify the IntelliJ shortcut so that it comments the line of code using the format from the second example, rather than the first?
Go to Preferences | Editor | Code Style | Java > Code Generation and untick “Line Comment at first column” checkbox: