WebStorm and PhpStorm allow you to reformat your code to fit the coding style set in settings (e.g.: indentation space)
I'm using this measure to fix some of the many lint errors in my project but I'm stuck at one point: is it possible to reformat all //
comments to begin with a space? To go from
//My comment
to
// My comment
If a comment already begins with a space character, it should be left alone.
Edit: There is an option in:
However, even with that selected, using the "Reformat code" option does not fix the comments.
'Add a space at comment start' option only affects 'Comment with line comment' action (Ctrl+/
) behavior, it is not used by formatter.
There is currently no way to insert leading spaces on formatting, please vote for WEB-26244
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