When I used OS X there was a shortcut (Cmd+D) that would dismiss the "Do you want to save" dialogue when a window with unsaved changes was closed. Is there an equivalent in Ubuntu and if not is there a way to implement this systemwide?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
I have not found a system-wide shortcut (even on OS X, the shortcut may change depending on the application), but there is a way to find the right shortcut for each prompt:
Alt mode in Sublime Text: alt+w for the 1st option
Note for those wondering how I could print screen while holding alt: you can either press alt just before the system screenshot is taken, or hold alt from another window of Sublime Text to show underlining (in Sublime Text all windows refer to the same prompt) and then click outside the application to cause a graphical bug that freezes the underlining. I did the latter and used Shutter to take the screenshot.
If the text is "Close without saving", odds are the magic character is w. If it is "Don't save", probably d as in many Mac applications, but not always (see examples below.)
Some applications are also kind enough to active alt mode automatically, i.e. you can see the magic characters underlined from the beginning and just have to type it to choose the option (without holding alt).
Some examples below:
Alternatively, you can navigate in the prompt using the left/right arrows and tab/shift+tab, then select the highlighted option with enter/space. However:
Therefore I recommend the second method only when dealing with less common prompts such as Ted's, where navigating once to the right is faster than checking the magic character and using it.
Screenshot text: from The Bourgeois Gentleman, new translation by Timothy Mooney