You can remove the empty or blank lines in the Editor view by following any of these methods:
- By using the keyboard shortcut
Place the cursor on a line and press Ctrl+D (for line Delete). You can also use Ctrl+D to delete multiple selected line.
Tip:
To get more commands for
deleting the blank lines, press
Ctrl+3
, enter
delete in the textbox, the related commands with their keyboard shortcut appears in the
Commands
list.
- By using the search and replace method
- Select
Edit > Find/Change
from IDE menu bar, alternatively press
Ctrl+F
.
The
Find/Replace
dialog box appears.
Figure 1.
Find/Replace Dialog Box

- Enter
^\s*\n
in the
Find
textbox and leave the
Replace with
textbox empty.
- Check the
Regular expressions
checkbox.
- Click
Replace All
.
The editor removes the blank lines.