开发者

Visual studio Reformat Code/Document

I can't find the Reformat button, I know I can use ctrl+k+d, but I wish to have also the toolbar with 开发者_如何转开发the button. can someone help me ?


You can use Edit > Advanced > Format Document and you can also move this as a button to any toolbar. Go to Tools > Customize > Commands, select Toolbar and push Add Command button. Then select Edit category and find Document Format.


Apparently VS2010 (maybe others) hide certain commands depending on the style you choose. I chose Web Dev (code) as my choice and the Document Format is not present to be added to a toolbar. But, if I change to C# Code (tools>Import/Export) then the Document Format command is right there in the Edit menu where others here have said it is.

I had to import the C# Dev layout, but unchecked colors and code formatting options (so it won't overwrite those). What section you must import to get the format document button, I don't know, I didn't experiment that deep.

Seems stupid MS chose to force us down specific paths for layout with no convenient way to get out of it.


If you can't find it in the Edit menu: you can also find it if you press CTRL + P and then type >format. The shortcut is SHIFT + ALT + F

Visual studio Reformat Code/Document

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜