max
max

Reputation: 314

IntelliJ shortcut ctr + / adds a comment at the first column instead of current

When I want to comment or comment my code out with the shortcut ctrl + /, IntelliJ puts the // at the first column instead of the current. How can I make comments at the current?

Example

        System.out.println(set.containsAll(subSet));
//        System.out.println(set.containsAll(subSet));

Using ctrl + /, I would like to make it like that

        //System.out.println(set.containsAll(subSet));

Upvotes: 12

Views: 1838

Answers (1)

CrazyCoder
CrazyCoder

Reputation: 401877

  • Settings | Editor | Code Style | Java | Code Generation | Comment Code | Line comment at first column -> Uncheck
  • Settings | Editor | Code Style | Java | Code Generation | Comment Code | Block comment at first column -> Uncheck
  • Settings | Editor | Code Style | Java | Wrapping and Braces | Keep when reformatting | Comment at first column -> Uncheck

Upvotes: 25

Related Questions