yvesj@yvesj-glaptop:~/.config/sublime-text-2/Packages/GoSublime$ cat Go\ build.sublime-build { "cmd": ["go", "build", "-v", "-x"], "file_regex": "^(.+):([0-9]+):.*", "selector": "source.go" } yvesj@yvesj-glaptop:~/.config/sublime-text-2/Packages/GoSublime$ cat Go\ test.sublime-build { "cmd": ["go", "test", "-x"], "file_regex": "^(.+):([0-9]+):.*", "selector": "source.go" } ~/.config/sublime-text-2/Packages/User$ cat Default\ \(Linux\).sublime-keymap [ { "keys": ["ctrl+shift+t"], "command": "run_build", "args": { "build_system": "Packages/GoSublime/Go test.sublime-build" } }, { "keys": ["ctrl+shift+b"], "command": "run_build", "args": { "build_system": "Packages/GoSublime/Go build.sublime-build" } } ] ~/.config/sublime-text-2/Packages/User$ cat RunBuild.py import sublime, sublime_plugin class RunBuildCommand(sublime_plugin.WindowCommand): def run(self, build_system): self.window.run_command( "set_build_system", {"file": build_system } ) self.window.run_command( "build" ) Thanks to these guys: Also need to install the package management thing, and then GoSublime. |
configs >