0

In the past, ctrl+w used to close a single tab in Sublime Text (3), and if there were no tabs left open, it would close the text editor. How can I achieve the same behaviour in the updated Sublime Text? ST 4

EDIT: The setting I was looking for is "close_windows_when_empty": true

2 Answers2

0

Sublime Text 4 behaves for me as described - it closes all open files and when no files are open, it closes the editor.

However, you may have had your key bindings changed by a plugin/misconfiguration etc.

Preferences > Key Bindings will open up a file.

Ensure that for ctrl+w, the command is set to close not close_file.

Once changed, restart Sublime.

It should look like below:

...
{ "keys": ["ctrl+w"], "command": "close" },
...
Ermiya Eskandary
  • 15,323
  • 3
  • 31
  • 44
0

Really strange, for me this settings wasn't working:

"close_windows_when_empty": true

tried and tested everything else, finally I've completely uninstalled Sublime 4 and reinstalled it (using AppCleaner, deleted all configs etc).

Now:

"close_windows_when_empty": false

is really set to false, BUT the last window is always closing "everything". exacty what I wanted. It works even the settings tells something else. So: Reinstall possibly helps

cV2
  • 5,229
  • 3
  • 43
  • 53