Visual Studio Format entire file?

给你一囗甜甜゛ 提交于 2019-12-02 17:05:28

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.

Tomas Aschan

Ctrl+K,Ctrl+D

This question with answers has a lot of handy tips.

Lucy

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..

John

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

Tony

Shortcut in visual studio to format the whole document is Ctrl + E, D

Igor Zevaka

I just use built-in Visual Studio formatting command: Ctrl+A, Alt+F8

user3657964

Ctrl+E+D in Visual Studio Express 2013.

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