Fork me on GitHub
删除代码中所有的空行

在Visual Studio中, 可以用正则表达删掉所有的空行

下面是具体操作步骤:

  1. Enter: Ctrl+H
  2. Find what: ^:b*$\n
  3. Replace with: [Empty]
  4. Look in: Current Document
  5. Find Option: Use Regular Expressions
  6. Click: Replace All

这种方法只能对整个文件进行操作, 而不能选中某些行进行操作.

posted on 2010-05-27 11:39  HackerVirus  阅读(535)  评论(0编辑  收藏  举报