【问题标题】:Insert closing curly brace '}' when pressing enter in WebStorm在 WebStorm 中按 Enter 时插入右大括号“}”
【发布时间】:2013-09-27 14:10:37
【问题描述】:

当我放置一个左大括号 { 并按 Enter 来创建一个新行时,WebStorm 会自动放置一个右大括号 }。我怎样才能阻止这个?我在 WebStorm 的首选项中找不到它:

Settings -> Code Style -> JavaScript -> Wrappings and Braces 没有显示任何相关内容。

【问题讨论】:

    标签: webstorm


    【解决方案1】:

    当按下 Enter 时:

    Settings | Editor | General | Smart Keys | Enter | Insert pair '}'

    一般:

    Settings | Editor | General | Smart Keys | Insert pair brackets (), [], {}, <>

    这就是你在PhpStormWebStorm 中的做法。

    【讨论】:

    • 是的!更准确地说是settings -> editor -> smart keys -> Enter -> insert pair '}'(有两个类似的选项。第二个有效。)非常感谢。
    • 我正在使用 angularjs 插件 plugins.jetbrains.com/plugin/6971 但是当我在 html 文件中打开大括号 {{ 时,它没有按照日志中的说明添加右大括号,我检查了智能键 -> Enter ->插入对'}'已经检查过了,请指教
    • 我正要把我的 Mac 扔到一个窗口里!谢谢你,你把我的心从精神错乱中拯救了出来!
    猜你喜欢
    • 1970-01-01
    • 2023-02-16
    • 1970-01-01
    • 1970-01-01
    • 2021-09-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-23
    相关资源
    最近更新 更多