当前位置: 首页 > article >正文

[vscode]格式化C#代码

vscode中的插件

EditorConfig for VS Code
https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig

安装步骤

# 安装
npm install -g editorconfig | npm install -D editorconfig

# npm报错
cnpm install -g editorconfig

配置的内容

root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 300

微软官方说明文档

https://learn.microsoft.com/zh-cn/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options

处理不了的事情

  1. 括号里面是空的情况会统一行,不会自动换行。

http://www.kler.cn/news/342417.html

相关文章:

  • 鸿蒙开发(NEXT/API 12)【HTTP数据请求】网络篇
  • oracle set命令
  • 澳鹏干货 | 大语言模型的上下文窗口 (Context Windows)
  • 使用 Go 语言与 Redis 构建高效缓存与消息队列系统
  • 六西格玛设计DFSS方法论在消费级无人机设计中的应用——张驰咨询
  • LangChain从模型中提取json输出
  • [含文档+PPT+源码等]精品基于Python实现的Django高校职业通的设计与实现
  • python sqlite3 工具函数
  • 【OpenCV】基础操作学习--实现原理理解
  • 论文阅读:OpenSTL: A Comprehensive Benchmark of Spatio-Temporal Predictive Learning
  • 如何提高LabVIEW编程效率
  • GitHub Copilot 使用手册(一)--配置
  • 雨晨 24H2 正式版 Windows 11 iot ltsc 2024 适度 26100.2033 VIP2IN1
  • Leetcode 135-分发糖果
  • 软件工程pipeline梳理
  • C++之LIST模拟实现(代码纯享版)
  • 使用pycharm 开发streamlit的项目,怎么启动项目,进行debug调试
  • 磁盘I/O测试工具-FIO
  • 小猿口算脚本
  • 前端 NPM