11

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.

3 Answers3

12

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.

Prashant Singhal
  • 139
  • 1
  • 10
1

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" }
bitwhys
  • 181
  • 1
  • 4
0

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
Gabriel Staples
  • 36,492
  • 15
  • 194
  • 265