0

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

Nozomi
  • 56
  • 4
  • have you verified that the JetBrains IDE actually affects all files when saving only one file? – starball Jul 09 '23 at 18:43
  • Yes, all saved files are affected in IntelliJ Idea. The reason why I mentioned Idea IDE is to show that the option I want exists in another IDE. And i want to achieve the same thing in visual studio code. – Nozomi Jul 09 '23 at 21:49

0 Answers0