键盘快捷键删除空行的C#代码文件 [英] Keyboard shortcut to remove empty lines in a C# code file
本文介绍了键盘快捷键删除空行的C#代码文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有键盘快捷键来删除C#代码文件空行(的.cs)?
Is there any keyboard shortcut to remove empty lines in C# code files (.cs)?
类似于<大骨节病>控制骨节病> + <大骨节病>氏/骨节病>,<大骨节病> D 骨节病>哪些格式整个cs文件。
Similar to Ctrl + K , D which formats the whole .cs file.
还是有解决方法吗?
推荐答案
使用查找和替换对话框(<大骨节病>控制骨节病> + <大骨节病> ^ h 骨节病>)。搜索
Use the Find and Replace dialog (Ctrl + H). Search for
\n\n
和
\n
使用正则表达式(扩大查找选项部分启用)。
using regular expressions (expand the Find Options section to enable).
如果您要删除包含什么,但空白行,你可以尝试搜索
If you want to remove lines containing nothing but whitespace you could try searching for
\n\s*\n+
这篇关于键盘快捷键删除空行的C#代码文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文