I'd like to know if there is an option on Sublime text to close and re open, for using after installing some plugin or in bug case.. I've been searching but I couldn't find anything... Thanks.
-
What do you mean? Can't you just close and open it with with red x in the corner? – Mark Skelton Feb 23 '17 at 00:14
-
2Yes, I can, but being an awesome tool I though sublime had that option... – Zacarías Samaniego Feb 23 '17 at 17:56
-
I was under the impression Sublime had such functionality after seeing the following message from SublimeLinter: "SublimeLinter has been installed or upgraded. Please restart Sublime Text.". Apparently not. – Andrew Grimm Apr 29 '18 at 23:00
3 Answers
You can use the Restart plugin/package in Sublime Text 2 as well as Sublime Text 3. Install it from Package Control's package install in your sublime text.
After installing Restart, simply press F5 key or use File > Restart option.
Note: To open package control use Ctrl/Command + Shift + P.

- 139
- 1
- 10
-
-
3Just to be more specific: Ctrl/Command + Shift + P>Package Control: Install Package>Search Restart>Enter – Mayuresh Srivastava Aug 28 '17 at 18:29
-
-
The package installed fine in Sublime Text 4, but it doesn't work. [This does, however](https://stackoverflow.com/a/74452976/4561887). – Gabriel Staples Nov 15 '22 at 22:36
From the Restart Git repo: Removal of key maps
After an initial install the shortcut key ,F5, freezes the application. As the above illustrates this is because the key bindings have been removed (why? I couldn't find any conflicts). To fix this add the following to your keymap file:
{"keys": ["f5"], "command": "restart"},
Using the documentation as a guide you can add this to the Command Palette by editing or creating a file 'file_name.sublime-commands' anywhere under sublime-text-3/Packages/ and adding the following to it (Use what ever value for caption you like)
{ "caption": "Restart", "command": "restart" }

- 181
- 1
- 4
How to upgrade and restart Sublime Text from the command-line in Linux Ubuntu, with no special Sublime packages installed
I hate the idea of having to install a whole package just to "restart" Sublime.
So, here's what I do, from a regular terminal command-line. Tested on Ubuntu 20.04 with Sublime Text 4:
# How to "restart" Sublime Text
# 1. kill it
pkill sublime
# 2. start it up again
subl
I had 6 windows open, with a bunch of tabs in each, before running pkill
. After "restarting" sublime like this, all 6 windows were back open again, with all of their same tabs as before, just as though I had restarted my computer.
Bonus:
Restarting Sublime is required after upgrading it. So, here are my 3 commands to upgrade and restart. This assumes you already followed the instructions here to install Sublime Text in the first place using apt
on Ubuntu.
# upgrade Sublime Text to the latest version
sudo apt udpate
sudo apt install sublime-text
# Now restart sublime text
pkill sublime
subl

- 36,492
- 15
- 194
- 265