效果

方法

  1. 打开编辑器vscode
  2. "编辑" > "替换"
  3. 空行的正则表达式是:(包括空格、大空格、行尾的换行符--方便合并多个空行为0个空行)
    ^(\s*)$\n

    \s代表任意的空字符,\n代表屁股的换行符,如果无法匹配,请用"\n\r"

  4. 替换为空字符

Visual Studio Code - Code Editing. RedefinedVisual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.https://code.visualstudio.com/

Getting Started

Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET and Unity). Begin your journey with VS Code with these introductory videos.

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐