What this will do:
- Trim empty lines (remove all whitespace)
- Trim whitespace at the end of code lines
- Note: it will not remove any line at all, but simply trim trailing whitespace.
Steps:
- Press
Ctrl + F
(Cmd + F
on mac) to open the search and replace view. - Toggle the regex button
.*
. - Paste
([ \t])+$
in the Find field, and leave the Replace field empty.
([ \t])+$
- Click replace all.
Done.
It would look like this: