You want to tune the 2 seconds for your own particular setup. Here we check to see if sublime_text is running or not, and if it's not we pause and delay for 2 seconds before continuing. There is no way to pass exit code from Sublimerge. # If Sublime is not running, start it and wait for plugins to load SUBL=/home/prog/sublime-text/sublime_text/sublime_text # Set up where Sublime is (this could also be on the PATH) ![]() If not, it needs to start Sublime first and then wait for it to finish before starting the command.Īn example of that is the following: #!/bin/bash Modify the shell script so that it checks to see if sublime_text is currently running if it is, you can proceed.To solve the problem, you need to do one of two things: ![]() This is an issue for what you're doing here in cases where Sublime isn't already running because subl delivers the command to Sublime right away, but if the plugin host hasn't finished starting up yet the core receives the command but can't execute it because the host isn't ready, so it's ignored. If Sublime isn't already running, it starts Sublime first before continuing. When you execute subl it hands off what you asked it to do to the running instance of Sublime and then terminates. There's a command line helper named subl (which on Linux is just a symlink/script that executes sublime_text directly, though it's a distinct thing on other platforms) that can be used to interact with Sublime from the command line. Should a plugin do something that causes a crash or hang, that happens to the plugin host, leaving Sublime still running that allows you to save your work and recover, whereas in ST2 it would cause you to lose unsaved changes. It makes Sublime start faster (particularly if you have a few packages with plugins installed) because it starts up and lets you start working while packages are still loading The plugin hosts are responsible for finishing their startup, then loading and activating all of the installed plugins. When Sublime starts it launches the plugin host(s) as separate applications and then reloads session information to set up the window. The issue stems from the fact that in ST3 and up, plugins are executed in an external plugin_host (by contrast, in ST2 the plugin host is built into the core). ![]() This is caused by asynchronous plugins loader in ST3 and cannot be fixed from plugin level.Otherwise, when launching Sublimerge while ST is running, everything works fine. ST3: running Sublimerge from command line (only when Sublime Text was not already running) only opens files without doing diff. The issue you're running into is outlined further down on the page on the integration page for Sublimerge that you posted above, which is:
0 Comments
Leave a Reply. |