- Step 1: Open macOS system settings and turn “Ask to keep changes when closing documents” off: System Settings > Desktop & Dock > Ask to keep changes when closing documents = Off.
- Step 2: Open an HTML file in TextEdit or Xcode. Also, open this file in Safari (or another web browser).
- Step 3: Using TextEdit or Xcode, make some changes there.
- Step 4: Refresh the webpage in Safari. The webpage will reflect the changes you have just done.
- Step 5: Return to TextEdit or Xcode and try to close its window. You will be prompted to save the file first.
It seems it doesn’t work for Sublime Text. What I mean is that if you have “Ask to keep changes when closing documents” on and you didn’t press Command-S in Sublime Text before updating the page in Safari, the page won’t reflect your changes.
That is, it is necessary to press Command-S first before refreshing the page? Am I correct? Is there a fix for it?