Sublime Forum

Is there a switch to close current tab when I close window?

#1

I want to have a switch to change the behaviour when I close window.

Now, when I close window, it just preserves the status till next time I open ST3. But, the actual thing I want to do, every time I close window, is to close current tab.

Someone else sharing this idea? I want to have a switch to adjust this behaviour: when it is set to true, when I close window, I close active tab, too; if should save, let the prompt tells me. If it is false, act like what it does now: preserves the status.

I just don’t want to have some many tabs open there after a time.

0 Likes

#2

Put the following in your Preferences file:

"hot_exit": false,
0 Likes

#3

Thanks frou. I have tried and that is not what I want; when I open ST3 again, all tabs are closed and not restored. But I just want to close current tab.

0 Likes

#4

hot_exit doesn’t pertain to that… hot_exit is what saves the session when you close a window under the project you have loaded…

For instance, if you have a project loaded with hot_exit enabled and you have a settings window open… but you accidentally close the project window instead of the settings window - you can simply reload the project and it’ll be safe… Likewise, if you close the window which closes sublime text ( last window ) and you re-open it, the tabs will be safe from being closed…


To be honest - I’m not sure whether or not that exists… You may be able to prevent tabs from closing by using on_close or a pre callback in a plugin - however this would be better accomplished in the back-end to redirect the behavior…

I would like something like this too except I would prefer if the X would close sublime-text entirely instead of just the window ( unless it is a settings window )

Maybe submit the suggestion here: https://github.com/SublimeTextIssues/Core/issues

There should be a way to hold shift and press spacebar though to keep the cursor in the same position and add text after - for example hold a key to write backwards… I think I saw an addon somewhere for that - or it was a key combo you pressed… Although it could’ve been in a different editor or it was part of an AutoHotkey script…

I’ll look into it to see if I can find the name or where it was exactly I encountered it.

1 Like