How to format current file automatically without saving manually?
See original GitHub issueI want Prettier to format everything I type in supported languages without manually saving or unfocusing editors. formatOnType
appears to be unsupported. formatOnSave
only works if I set autoSave
to onWindowChange
or onFocusChange
, but I want to be able to write large amounts of code in the current file keeping it formatted without manually saving, and afterDelay
does not trigger formatOnSave
.
Is there a supported configuration for this use case, or would formatOnType
or afterDelay
need to be implemented?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:9 (4 by maintainers)
Top Results From Across the Web
How to format on save on a file with no changes in JetBrains ...
You can reformat a file with ⌥ + ⌘ + L on a Mac or Ctrl + Alt + L on Windows.
Read more >What is AutoSave? - Microsoft Support
The easy way is to turn the AutoSave switch off before you make your changes. If the changes are meant to be temporary...
Read more >VS Code tips — Auto save - YouTube
With auto save, VS Code automatically saves your code as you work.Configure when files are auto saved with the files.autoSave setting.
Read more >How to recover unsaved Excel file or restore its previous version
Luckily, the options to auto save and auto recover files are turned on in Excel by default. If you are not sure, you...
Read more >Basic Editing in Visual Studio Code
Search, multiple selection, code formatting. ... The easiest way to turn on Auto Save is with the File > Auto Save toggle that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I understand part of the issue is with VSCode and not the Prettier extension, but what is the best answer to my question? I was hoping to find a recommended solution that solves these issues, even if it doesn’t involve changes to the Prettier extension.
I am still having this issue today. Looks like it has not been resolved.