You can run that using a sublime-build file.
There are a few of them in the Data\Packages\ folders to see how they work.
Example Ant.sublime-build:
{
"cmd": "ant"],
"file_regex": "^ *\\[javac\\] (.+):([0-9]+):() (.*)$",
"working_dir": "${project_path:${folder}}",
"selector": "source.java",
"windows":
{
"cmd": "ant.bat"]
}
}
replace cmd: “ant.bat”] with the command you’d like to run and set the appropriate selector
Or you can create a plugin and call it using a key binding in (in this example command:“run_preditor”)
import sublime, sublime_plugin, subprocess, os
class RunPreditor(sublime_plugin.EventListener):
def run(self, edit):
if os.name == "nt":
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
process = subprocess.Popen(('Preditor.exe','/UPDATE', 'mars/mars@P2G', '%1', '-', 'where', '%1=', view.file_name()),
stdin=subprocess.PIPE, stdout=subprocess.PIPE, startupinfo=startupinfo)
(Note: quick cut and paste, I haven’t tested this you will probably need to tweak the Popen arguments)
{ "keys": "f7"], "command": "run_preditor" }