Header Ads

HOW TO REMOVE EMPTY LINES IN VISUAL STUDIO CODE

 Method 1:

Here is a step by step instructions to remove those empty lines.

  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 ‘Replace All’ button

Method 2:

The above method should remove all the empty line however if it doesn’t then follow these steps:

  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 ^(\s)*$\n
  4. Leave the replacement box empty
  5. Make sure the ‘Use Regular Expression’ is selected
  6. Select ‘Replace All’ button
HOW TO REMOVE EMPTY LINES IN VISUAL STUDIO CODE
HOW TO REMOVE EMPTY LINES IN VISUAL STUDIO CODE


Powered by Blogger.