简体   繁体   中英

Visual Studio Format entire file?

是否可以使用CodeRush Express发出关键命令来正确格式化VS2008中的整个文件?

Use Ctrl + K + Ctrl + D to format document keystroke

Use Ctrl + K + Ctrl + F to format selection keystroke

It's also possible to set your own keystrokes by opening Options... dialog (select Tools->Options from the menu). In Options dialog select Environment->Keyboard form the tree and set your own shortcuts for Edit.FormatDocument.

You could always go to Tools -> Options -> Keyboard and give the Edit.FormatDocument a new shortcut.

Update You can also see what the Shortcuts mapped to this command are this way.

Ctrl + K , Ctrl + D

This question with answers has a lot of handy tips.

Visual Studio中用于格式化整个文档的快捷方式是Ctrl + ED

Just select all content of page by Ctrl + A then click Ctrl + K and Ctrl + D . The whole page tag format.

For example see this link: Format the content

If Ctrl + E + Ctrl + D or Ctrl + K + Ctrl + D or Ctrl + K + Ctrl + F doesn't work for you, try to set below settings:
Tools->Options -> Text Editor ->C# ->Tabs ,
make sure `Keep tabs is selected.
Then, go back to your text editor, re-try formatting.

I was really annoyed before, and steps above works for me. hope it works for you guys..

我只是使用内置的Visual Studio格式化命令: Ctrl + AAlt + F8

在Visual Studio Express 2013中, 按Ctrl + E + D

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM