有没有办法让行注释快捷方式在 WebStorm 中的//之后添加一个空格? [英] Is there any way to have the line comment shortcut add a space after // in WebStorm?

查看:83
本文介绍了有没有办法让行注释快捷方式在 WebStorm 中的//之后添加一个空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用快捷方式注释一行代码(Mac 上为 command/)时,代码行会在其前面添加一个 //.(指出明显的主题澄清).

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).

在风格上,我想在 // 和我注释掉的一些代码的开头之间添加一个空格.即在添加 //function foo() { 而不是 //function foo() { 时成为注释领导者,这是默认的.

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.

我找不到的是如何在 JetBrains WebStorm 中更改此设置(我已经尝试浏览他们的网站和首选项等,但没有成功)-我也进行了很多搜索(我的 google-foo 很糟糕)!) 但尚未找到如何更改此设置.

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?

推荐答案

据我所知这是不可能的.

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

https://youtrack.jetbrains.com/issue/IDEA-141701 -- 观看这张票(明星/投票/评论)以获取进度通知.

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

更新(2016 年 4 月 20 日)

UPDATE (20th April, 2016)

从 2016.1 版本开始实施并可用.

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 |代码生成 |注释代码
  • JavaScript/TypeScript -- <代码>JavaScript |其他 |注释代码
  • PHP -- <代码>PHP |其他 |注释代码

这篇关于有没有办法让行注释快捷方式在 WebStorm 中的//之后添加一个空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆