简体   繁体   English

在 Visual Studio 2019 中将左大括号保持在同一行

[英]Keep open braces on the same line in Visual Studio 2019

By default, my VS 2019 creates new function definitions like this:默认情况下,我的 VS 2019 会创建新的 function 定义,如下所示:

void somefunction() 
{
    
}

Is there a setting I can change to default it to this?有没有我可以更改为默认设置的设置?

void somefunction() {
    
}

Go to ToolsOptionsText EditorC/C++FormattingNew LinesPosition of open braces for functionsKeep on same line... Go 到工具选项文本编辑器C/C++格式化→ 换Position 函数的开大括号保持在同一行...

函数的开括号位置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 保持其他,捕获,与Visual Studio 2015中的右括号相同? - Keep else, catch, on same line as closing bracket in Visual Studio 2015? 无法在 Visual Studio 2019 中打开文件 - Cant open a file in Visual Studio 2019 Visual Studio 2019不会打开包含源文件的窗口,并且不会与错误对齐 - Visual Studio 2019 does not open window with source file and does not position to line with error 如何使clang格式在同一行上保持右花括号 - How to make clang-format keep closing braces on same line 使用clang-format - 在同一行保留空括号 - Using clang-format - keep empty braces on the same line Visual Studio 2019 - 打开花括号时不要插入换行符 (C++) - Visual Studio 2019 - don't insert a linebreak when opening curly braces (C++) visual studio 2019 - C++ 无法打开源文件 - visual studio 2019 - C++ cannot open source file Python OpenCv 构建未在命令行中检测到 Visual Studio 2019 - Python OpenCv build is not detecting visual studio 2019 in command line 如何在 Visual Studio 2019 中使用首字母或快捷代码行自动填充代码? - How to autofill code with initials or shortcut line of code in Visual Studio 2019? 使用 Visual Studio 2019 显示 CMake 的编译器命令行 - Show compiler command line of CMake with Visual Studio 2019
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM