gpt4 book ai didi

dart - vs代码1.47.1自动重新格式化 Dart 代码文件

转载 作者:行者123 更新时间:2023-12-03 04:20:30 25 4
gpt4 key购买 nike

不幸的是我回答是
进入vs代码提示以更改设置,现在,
当我编辑.dart文件时,它会自动重新格式化。
在某些情况下,git显示整个文件已被修改。
在某些地方,将2个空格替换为4个空格。
在另一个地方添加了代码。
settings.json文件上的时间戳是今天(2020年7月14日)太平洋标准时间上午11:20。
有没有办法找出对settings.json文件的最新更改?
之前:

  icon: FaIcon(FontAwesomeIcons.solidBuilding), /*Icon(Icons.format_list_bulleted ),*/

后:
  icon: FaIcon(FontAwesomeIcons.solidBuilding),
/*Icon(Icons.format_list_bulleted ),*/

之前:
  MyClass({
this.field1,
this.field2,
this.field3
});

后:
MyClass({this.field1,this.field2,this.field3});
之前:
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
AvatarUpload(
后:
 child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
AvatarUpload(
AvatarUpload(
AvatarUpload(
我需要还原什么设置?
settings.json
{
"editor.tabSize": 2,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.js": { "when": "$(basename).ts"}
},
"files.autoSave": "afterDelay",
"workbench.iconTheme": "vscode-simpler-icons",
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"solidity.linter": "solhint",
"solidity.solhintRules": {
"avoid-sha3": "warn"
},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"java.configuration.checkProjectSettingsExclusions": false,
"peacock.favoriteColors": [
{
"name": "Angular Red",
"value": "#b52e31"
},
{
"name": "Auth0 Orange",
"value": "#eb5424"
},
{
"name": "Azure Blue",
"value": "#007fff"
},
{
"name": "C# Purple",
"value": "#68217A"
},
{
"name": "Gatsby Purple",
"value": "#639"
},
{
"name": "Go Cyan",
"value": "#5dc9e2"
},
{
"name": "Java Blue-Gray",
"value": "#557c9b"
},
{
"name": "JavaScript Yellow",
"value": "#f9e64f"
},
{
"name": "Mandalorian Blue",
"value": "#1857a4"
},
{
"name": "Node Green",
"value": "#215732"
},
{
"name": "React Blue",
"value": "#00b3e6"
},
{
"name": "Something Different",
"value": "#832561"
},
{
"name": "Vue Green",
"value": "#42b883"
}
],
"dart.debugExternalLibraries": true,
"dart.debugSdkLibraries": false,
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"dart.openDevTools": "flutter",
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"diffEditor.ignoreTrimWhitespace": false,
"terminal.integrated.fontSize": 10,
"[dart]": {
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.rulers": [
80
],
"editor.selectionHighlight": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
"editor.tabCompletion": "onlySnippets",
"editor.wordBasedSuggestions": false
}
}

最佳答案

这个:

"[dart]": {
"editor.formatOnSave": true,
"editor.formatOnType": true,
...
}
将其更改为 "editor.formatOnSave": false,,而 "editor.formatOnType": false,取决于您的口味。

关于dart - vs代码1.47.1自动重新格式化 Dart 代码文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62906192/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com