How to make keyboard shortcut comment put slashes at beginning of text not line?

I swear PHPStorm by default put the slashes at the beginning of the text, but now it puts it at the beginning of the line, which can look bad and possibly throw me off when I'm scanning or searching code. Here's the keymap shortcut I use:

Now, I'm not seeing how to change whether the slashes start at the beginning of the line or the beginning of the text... I found this though I see no toggle for that here:

Does this toggle exist and where is it?

4 comments
Comment actions Permalink

Try searching for Line comment at first column option - it should be somewhere in your language code style preferences, usually on Code Generation tab. For example, for javascript it's in Preferences | Editor | Code Style | JavaScript | Code Generation, for HTML - Preferences | Editor | Code Style | HTML | Code Generation, for PHP - Preferences | Editor | Code Style | PHP | Code Generation

Unckecking it should solve your issue

1
Comment actions Permalink

Thank you! I found it.

It works as expected!

0
Comment actions Permalink

I noticed the setting didn't carry over to another project, then I had trouble finding it again because it doesn't highlight when I search for comment (like PHPDoc Align tag comments does).

Why doesn't the Code Generation option highlight for comment when two options there contain the word?

0
Comment actions Permalink

What version of PhpStorm do you have installed?

I just checked this option on my installation and, in fact, it is highlighted:

A short remark though -- you may need to click PHP setting section again while changing tabs as extra clicks will remove the highlight.

0

Please sign in to leave a comment.