Skip to content

How to remove empty lines in Visual Studio Code

  1. Open your code in Visual Studio Code
  2. From Edit Menu, select Replace or use a shortcut key (command + Option + F on Mac or Ctrl + H on Windows)
  3. In the find box type \n\n
  4. In the replace box type \n
  5. Make sure the ‘Use Regular Expression’ is selected
  6. Select the ‘Replace All’ button
5 3 votes
Article Rating
Notify of

Most Voted
Newest Oldest
Inline Feedbacks
View all comments