C++ Formatting like Visual Studio C# formatting

纵然是瞬间 提交于 2019-12-05 00:55:05

I'm using AStyle extension for VS2012 and I'm happy with it.
It's free :)

Select the code-text and press CTRL+K-F in Visual Studio - That's it :)

AlG

If you look at the Tools->Options->Text Editor settings you can control some of what you want, but I don't think as much as you'd like. Instead of changing editors, if the code style is that important, why not run it through a pretty printer? Check out this thread for ideas.

You'll struggle to find a much better editor than Visual Studio for writing c++ code. You will get used to it eventually. If you really cannot cope, then take a look at Visual Assist. It is a little pricey but it will beautify your code colours.

SlickEdit is a highly configurable editor and offers tagging functionality (what VS calls "Intellisense") that blows VS and Visual Assist out of the water. Plus there's a cool preview window that shows you the definition for the thing under the cursor, which is lightning fast (and you can turn off if you want).

I use vim these days, though, which is even more highly configurable, and I'll never go back. It's a little trickier to get configured well, though.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!