level 1
被晒干的柚子皮
楼主
使用的VSCode 最新版本,平台Windows11,插件:C/C++、Code runner、Atom One Dark Theme、中文简体扩展包、驼峰翻译助手、 Error Lens。
目前存在的问题是,本来代码没有问题,只是格式不好,然后格式化的时候会将代码乱改动,不知道什么原因。
问题偶尔复现,不是每次都会被乱改。
原本代码:无error

格式化一次:在*it中间乱加了一个空格,导致出错![[黑线]](/static/emoticons/u9ed1u7ebf.png)

格式化第二次: <<变成了一个,*it 后面又莫名其妙的加了三个空格![[喷]](/static/emoticons/u55b7.png)

格式化第三次:<< 直接没了
空格继续加大

反正就是越格式化越离谱,代码莫名其妙的就没了或者被改了
软件设置:
"C_Cpp: Clang_format_style":file,
"C_Cpp.codeAnalysis.updateDelay": 10,
"C_Cpp.clang_format_style": "file",
"C_Cpp.formatting": "vcFormat",
"C_Cpp.clang_format_sortIncludes": true,
"files.encoding": "gb2312",
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.formatOnPaste": true,
求助大佬可以解答问题,感激不尽!!!
2022年03月12日 13点03分
1
目前存在的问题是,本来代码没有问题,只是格式不好,然后格式化的时候会将代码乱改动,不知道什么原因。
问题偶尔复现,不是每次都会被乱改。
原本代码:无error

格式化一次:在*it中间乱加了一个空格,导致出错
格式化第二次: <<变成了一个,*it 后面又莫名其妙的加了三个空格
格式化第三次:<< 直接没了
反正就是越格式化越离谱,代码莫名其妙的就没了或者被改了软件设置:
"C_Cpp: Clang_format_style":file,
"C_Cpp.codeAnalysis.updateDelay": 10,
"C_Cpp.clang_format_style": "file",
"C_Cpp.formatting": "vcFormat",
"C_Cpp.clang_format_sortIncludes": true,
"files.encoding": "gb2312",
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.formatOnPaste": true,
求助大佬可以解答问题,感激不尽!!!