[英]How can I make the format document shortcut work for C source files in Visual Studio 2008?
How can I make Ctrl + K + D work in a pure C file? 如何让Ctrl + K + D在纯C文件中工作? I really enjoy the auto formatting in C#, and I would like to have the same functionality in C as well.
我真的很喜欢C#中的自动格式化,我也想在C中使用相同的功能。
I am using Visual Studio 2008, but it would probably be helpful if this worked in Visual Studio 2005 as well. 我正在使用Visual Studio 2008,但如果在Visual Studio 2005中也可以使用它可能会有所帮助。
In Visual Studio 2003, Ctrl + K , Ctrl + F let you format a selection. 在Visual Studio 2003中, 按Ctrl + K , Ctrl + F可以设置选择的格式。 This and other key combinations to format text can be found in menu Edit → Advanced .
可以在菜单编辑 → 高级中找到格式化文本的此组合和其他组合键。
In Visual Studio 2010 and 2008 - the formatting of a selection can be achieved by CTRL+E CTRL+F.. 在Visual Studio 2010和2008中 - 可以通过CTRL + E CTRL + F来实现选择的格式。
I suppose since C/C++ can be peppered with loads of preprocessor directives and defines and such - formatting the entire document would be too difficult to process.. 我想,因为C / C ++可以充满大量的预处理器指令和定义等 - 整个文档的格式化将难以处理。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.