HOW TO REMOVE EMPTY LINES IN VISUAL STUDIO CODE
Method 1:
Here is a step by step instructions to remove those empty lines.
- Open your code in Visual Studio Code
- From Edit Menu, select Replace or use a shortcut key (command + Option + F on Mac or Ctrl + H on Windows)
- In the find box type \n\n
- In the replace box type \n
- Make sure the ‘Use Regular Expression’ is selected
- Select ‘Replace All’ button
Method 2:
The above method should remove all the empty line however if it doesn’t then follow these steps:
- Open your code in Visual Studio Code
- From Edit Menu, select Replace or use a shortcut key (command + Option + F on Mac or Ctrl + H on Windows)
- In the find box type ^(\s)*$\n
- Leave the replacement box empty
- Make sure the ‘Use Regular Expression’ is selected
- Select ‘Replace All’ button