Skip to content

Instantly share code, notes, and snippets.

@AFirooz
Last active December 26, 2025 12:56
Show Gist options
  • Select an option

  • Save AFirooz/f9594286c76e1350fd253fcf3ce517fd to your computer and use it in GitHub Desktop.

Select an option

Save AFirooz/f9594286c76e1350fd253fcf3ce517fd to your computer and use it in GitHub Desktop.
Misc VSCode

How to remove ALL empty lines

  1. Open Find (Ctrl+H), check "Use Regular Expression".
  2. Find: ^\s*\r?\n (matches empty or whitespace-only lines).
  3. Replace with: Leave empty.
  4. Click "Replace All".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment