Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Add New Line to FilesNew to Visual Studio Code? Get it now.
Add New Line to Files

Add New Line to Files

Jeremy Forsythe

|
9,845 installs
| (1) | Free
Ensures all files end in a new line on save
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Add New Line to Files Visual Studio Code Extension

This extension ensures that all files end in a new line when you save them

Features

When you save any file, this will add a new line to the end of the file, if there isn't one present. You can set the preferred line ending in the config option editor.lineEnding in your User Settings or Workspace Settings. Default is \n.

Extension Settings

This extension contributes the following settings:

  • editor.lineEnding: (string) - default "\n" - the line ending to use when adding to the end of your files

Known Issues

There is currently no way to whitelist or blacklist file types. This is planned for a future release.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft