If I want to comment line I use "Ctrl+/" and get the "//" at start of line
Then I use auto formatting with "Ctrl+alt+L" keys and get
At the end I must remove space between "//" and text manually every time...
Can I do all of these steps in one time? I didn't find any settings for this...
In this case, using a multi-line comment is our only option no matter how short our comment needs to be. Block comments are enclosed in slash-asterisk ( /*) and asterisk-slash ( */ ). To add a block comment in IntelliJ IDEA, press ⌥ ⌘ / macOS or Ctrl + Shift + / on Windows and Linux.
Go to Settings/Preferences | Editor | Code Style, select your programming language, and open the Wrapping and Braces tab. In the Keep when reformatting section, select the formatting rules which you want to ignore and deselect those which should be applied. Reformat your code ( Ctrl+Alt+L ).
Basically, it's the guide line showing where the wrapping will occur (if enabled for certain code constructions).
An alternative, not perfect though, is:
Line Comment at first column
The menu hierarchy is the one in Intellij IDEA 14.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With