When I started using VSCode in 2018, we had no option for being warned before quitting the terminal.
This was extremely annoying when we accidentally pressed cmd + Q or cmd + W and instantly closed the code editor.
I found an extension called "Quit Control for VSCode" that implemented this control, which I have been using until today.
![Quit Control for VSCode extension](/_vercel/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2Fgc3hakk3%2Fproduction%2F92fc3b48103074a73ccbb45628f0d7b9f473fce2-2206x620.png%3Frect%3D0%2C1%2C2206%2C619%26w%3D1300%26h%3D365%26auto%3Dformat&w=640&q=100)
But "Today I Learned" that VSCode had implemented that feature in 2022 (took longer than I expected 🤷♂️).
To enable it, open your user settings, search for confirm before close, and mark it as always.
![Settings to enable confirm before close](/_vercel/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2Fgc3hakk3%2Fproduction%2F6070af61cd8ffb7473867a881a6b03e48893d930-1790x608.png%3Frect%3D0%2C1%2C1790%2C607%26w%3D1300%26h%3D441%26auto%3Dformat&w=640&q=100)
Now, if you try quite VSCode, a native pop-up will appears like this:
![VSCode Quite confirmation](/_vercel/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2Fgc3hakk3%2Fproduction%2Fd20d0397163653055e0a83263c22333bcb88e36f-558x528.png%3Fw%3D558%26h%3D528%26auto%3Dformat&w=320&q=100)