[英]indent line or selected region or whole document in visual studio 2010 C# with resharper
It seems like none of the settings for indentation are working for me. 似乎没有任何缩进设置对我有用。 Tried CTRl-K,Ctrl-F Ctrk-K,Ctrl-D Ctrl-I 尝试过CTRl-K,Ctrl-F Ctrk-K,Ctrl-D Ctrl-I
I don't want to move to the beginning of the line for every indent using tab. 我不想使用选项卡将每个缩进都移至行首。 Is there a set of commands that will work in my visual studio C# 2010 with Resharper, that will accomplish indenting line, selected region or whole document? 是否可以使用Resharper在我的Visual Studio C#2010中使用一组命令来完成缩进行,选定区域或整个文档?
thanks 谢谢
You can format the selection with Ctrl+E, F
and the whole document with Ctrl+E, D
. 您可以使用Ctrl+E, F
格式化选择内容Ctrl+E, F
并使用Ctrl+E, D
格式化整个文档。
Doing this should tidy up any missing/incorrect indents you may have. 这样做可以整理您可能缺少的所有缩进/错误缩进。
Edit 编辑
You can find these in Visual Studio by going to Edit -> Advanced. 您可以在Visual Studio中找到这些,方法是进入“编辑”->“高级”。 Format Document and Format Selection should be the first two items in the list. 格式文档和格式选择应该是列表中的前两项。
使用Resharper,正确的命令是Ctrl + Alt + F(代码清除),您可以使用该命令执行许多清除操作,包括缩进选择或文档
Change the background color to another color other than the page background (I used silver on a white main background) and it will give it that indented feel that you are looking for. 将背景色更改为页面背景以外的另一种颜色(我在白色主背景上使用了银色),这会给您带来所需的缩进感。
Options
> Environment
> Fonts and Colors
> Display Items: Preprocessor Keyword
and then change the item background
dropdown. Options
> Environment
> Fonts and Colors
>显示项目: Preprocessor Keyword
,然后更改item background
下拉菜单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.