有没有一种快速的方法/快捷方式来扩展 VS 代码括号中的内容(不是 collapsing/expanding 方法)
Is there a quick way/ shortcut for expanding contents in brackets for VS code (Not collapsing/expanding methods)
所以我的老师在一行中输入了这段代码:
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}]\
);
每个内容都移到自己的行。
他们可能使用 Prettier and its VS Code plugin 格式化您的代码
每当您点击“保存”或激活“格式化代码”命令时。
他可能使用了 Ctrl+K Ctrl+F
热键。
右键菜单有格式选项:
所以我的老师在一行中输入了这段代码:
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}]\
);
每个内容都移到自己的行。
他们可能使用 Prettier and its VS Code plugin 格式化您的代码 每当您点击“保存”或激活“格式化代码”命令时。
他可能使用了 Ctrl+K Ctrl+F
热键。
右键菜单有格式选项: