Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to have the line comment shortcut add a space after // in WebStorm?

Tags:

webstorm

When using the shortcut for commenting a line of code (command / on a Mac), the code line gets a // added in front of it. (Pointing out the obvious for topic clarification).

Stylistically I would like to add a space between the // and the start of some code that I'm commenting out. i.e. make the comment leader when added // function foo() { rather than //function foo() { which is the default.

What I can't find is how to change this setting in JetBrains WebStorm (I've already tried trolling their website and the preferences etc with no success) - I've also run many searches (my google-foo is terrible!) but have yet to find how to change this setting.

Anybody know how (or if?) this setting can be changed?

like image 465
keba Avatar asked Jan 08 '23 20:01

keba


1 Answers

As far as I'm aware it's not possible.

https://youtrack.jetbrains.com/issue/IDEA-141701 -- watch this ticket (star/vote/comment) to get notified on progress.


UPDATE (20th April, 2016)

It's now implemented and available as of 2016.1 version.

Settings/Preferences | Code Style -- It was implemented for these languages (not sure about any other):

  • Java -- Java | Code Generation | Comment Code
  • JavaScript/TypeScript -- JavaScript | Other | Comment Code
  • PHP -- PHP | Other | Comment Code
like image 86
LazyOne Avatar answered Jan 19 '23 00:01

LazyOne