Option or extension to remove all trailing blank lines at end of saved files in visual studio code

60 views Asked by At

I want to remove all trailing blank lines at end of files on saving in visual studio code. This option exists in IntelliJ Idea and work very well. Is there an option or an extension to do it in VS Code ?

I set this option "files.trimFinalNewlines": true in my user settings but it doesn't work like i want. I'm using VS Code 1.79.2 and i want this

File without trailing blank line

The only option "files.trimFinalNewlines": true that seemed to do what I want, always leave one line at the end of the file. So it's not okay.

Final line option in VS Code

File with final line to remove in VS Code

Here is the option in IntelliJ 2020.3 Remove trailing blank line option in IntelliJ Idea

0

There are 0 answers