Warning before closing my Cloud9 tab


Sometimes when I intend to close the editor tab that I’m working on, I actually close the browser tab because I hit command + W instinctively. Is there any way to prevent the tab from closing like this?


I’m glad you asked this :wink: You can enable this by going into preferences (top right gearwheel) then clicking on Settings and enabling “Warn Before Exiting”.

This is not enabled by default because the state of a file remains the same upon reopening the workspace. This works almost like closing your laptop lid while working on a Word document. Even if you haven’t “saved” it, the work is still there when you come back so no work will be lost.


I’m using c9 on a slow network. Though no doc lost with auto saving. The time to restore the tab still annoying. And the terminal tabs inside the IDE not always restored to the last working directories and followed with typed command history lost.

I’ve turned on “Warn Before Exiting” in USER SETTINGS. Still no warning on CMD+W with Chrome 50.0.2661.86 (64-bit) OS X 10.11.4.

Did I misunderstanding this option?
Should it working like this Gmail warning?

There is currently a request to the server pending. You may lose recent changes by navigating away.
Are you sure you want to leave this page?

Back to the beginning: I just want to close current unwanted tab inside the IDE other than interrupt all running works in the browser tab.


Please try restarting your workspace and then see if this works for you.


Sadly not work :pensive:


I’ve found an option in Chrome settings to make this work.
Manually add https://[*.]c9.io:443 to Privacy / Content Settings / Pop-ups / Exceptions
Still have no idea why other sites woking automatically.


If Chrome is in Fullscreen mode, you can actually change the keybindings to allow Cmd-W to close the c9 tab instead of the Chrome tab. Go to Preferences > Keybindings and at the top click "You can also manually edit your keymap file"
add this:

// Edit this keymap file and save to apply.
    { "command": "closetab", "keys": { "mac": ["Cmd-W"] } },

Now put Chrome into full screen, and you should be able to use Cmd-W to close the c9 tab.