【问题标题】:Is there a quick way/ shortcut for expanding contents in brackets for VS code (Not collapsing/expanding methods)是否有快速方法/快捷方式来扩展 VS 代码括号中的内容(不折叠/扩展方法)
【发布时间】:2020-10-11 16:30:54
【问题描述】:

所以我的老师在一行中输入了这段代码:

Alert.alert("Invalid Number!", "Number has to be a number between 1 and 99.", [{text: "OK", style: "destructive", onPress: resetInputHandler}]);

然后按下某些东西将其自动格式化为:

Alert.alert(\
"Invalid Number!",\
"Number has to be a number between 1 and 99.",\
[{text: "OK", style: "destructive", onPress: resetInputHandler}]\
);

每个内容移动到自己的行。

【问题讨论】:

    标签: javascript reactjs visual-studio-code shortcut expand


    【解决方案1】:

    他们可能使用Prettier 及其VS Code plugin 来格式化您的代码 每当您点击“保存”或激活“格式化代码”命令时。

    【讨论】:

      【解决方案2】:

      他可能使用了Ctrl+K Ctrl+F热键。

      右键菜单有格式选项:

      【讨论】:

        猜你喜欢
        • 2012-05-10
        • 2021-10-18
        • 1970-01-01
        • 1970-01-01
        • 2018-07-05
        • 2019-03-17
        • 1970-01-01
        • 1970-01-01
        • 2011-02-27
        相关资源
        最近更新 更多