Format Code (Strg K + D) in VS 2012

故事扮演 提交于 2020-01-23 16:58:47

问题


if I press STRG K + D in VS2010 the code (e.g. HTML, ASPX) will be formatted and empty lines will be deleted.

If I use this shortcut in VS2012 the empty lines will not be deleted. Is there a way to do this?


回答1:


I use the following combination to auto format indentations of my code in VS2012.

Ctrl+A to select all the code in a file to be formatted. Or you can select just a block of the code.

Ctrl+K, then Ctrl+F will format the code with proper indentations.

No deletion of empty lines though.



来源:https://stackoverflow.com/questions/13123479/format-code-strg-k-d-in-vs-2012

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