Skip to content

This extension helps you have more control over saving and formatting functionalities of VS Code

License

Notifications You must be signed in to change notification settings

BlackWild/format-on-second-save-vscode

Repository files navigation

Format on Second Save

You think good formatting is a virtue. And you always save your progress while you are coding. Alright! It's when the editor.formatOnSave setting of VS Code saves your life.

But...

Sometimes you are in the middle of writing a dirty code and you just want to conveniently save the file without formatting it, as well as being able to format the document only if you decide to.

Here it comes the format-on-second-save extension. This extension does a very simple job which we think should be a default VS Code functionality:

  • ctrl/cmd + s on a dirty file just saves the file
  • ctrl/cmd + s on an unchanged file formats and then saves the file

In this way, you have the control of only saving the file by your save shortcut... and you can also format the document by pressing the same shortcut for the second time.

Installation

In the official Extensions Marketplace, search for Format onSecondSave; then click on Install.

Format onSecondSave on Marketplace

Note

Here comes a tip for the VS Code dev team:

editor.formatOnSecondSave is a good name if you decided to add this feature to VS Code!

About

This extension helps you have more control over saving and formatting functionalities of VS Code

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published