Tip: Close all file in VSCode without saving

I updated my root folder because it had a typo in it. For some reason every time I type the word survey my fingers decide survery is what I really need.

After renaming the folder and blindly hitting “yes” to update all the imports and references I was left with a large number of open files with changes that I didn’t need - nearly all of them were changes to node_modules import statements.

Try to close these using the Close All option in the tab context menu and you will get a dialog for each and every one of those unsaved open files.

After getting annoyed with this I did some googling, quickly finding many people with the same issue. In particular this open issue #44024 in which it is mentioned that the Close Folder action will combine all the files.

This was much nicer.

You still need to Close All once you open the project up again but you won’t be asked to save each and every one of them again.

Published 14 Jun 2019

Things I wrote but probably aren't important. Usually somewhat programming related
Geoff Ford on Twitter