gpt4 book ai didi

c++ - 在 Eclipse 中缩进函数大括号

转载 作者:行者123 更新时间:2023-11-28 04:49:51 25 4
gpt4 key购买 nike

我正在开发一个 C++ 项目并使用 Eclipse 作为 IDE。该项目的编码标准指定缩进函数的初始和结束大括号,如:

int main()
{
return 0;
}

Eclipse 4.3.1 中是否有一个选项可以自动缩进这种方式?

最佳答案

使用主菜单导航到“窗口”->“首选项”。

在出现的对话框中,将您的方式扩展到 C/C++->代码样式->格式化程序。将 Active Profile 设置为 Whitesmiths 并根据口味进行编辑。

enter image description here

例如,您似乎想将 Indentation 选项卡上的 Indentation size 和 Tab size 设置为 2。

enter image description here

关于c++ - 在 Eclipse 中缩进函数大括号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48454473/

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