Go Build
A plugin for Sublime Text 2 to help manage and build a GO project
Details
Installs
- Total 17K
- Win 10K
- Mac 4K
- Linux 2K
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Go Build
Sublime Go Build is a plugin for Sublime Text 2 that will help you create a Go project structure, and run/build/test your project from withing the editor.
How to install
Install using Sublime Package Control (recommended)
Sublime Package Control allows you to easily install or remove SublimeGoBuild(and many other ST2 packages) from within the editor. It offers automatically updating packages as well so you no longer need to keep track of changes in SublimeGoBuild.
Install Sublime Package Control (if you haven't done so already) from http://wbond.net/sublime_packages/package_control . Be sure to restart ST2 to complete the installation.
Bring up the command palette (default
ctrl+shift+p
orcmd+shift+p
) and start typingPackage Control: Install Package
then press return or click on that option to activate it. You will be presented with a new Quick Panel with the list of available packages. TypeGo Build
and press return or on its entry to install SublimeGoBuild. If there is no entry for SublimeGoBuild, you most likely already have it installed.
Manual Instalation
Download the package
* For Windows:
Go to %APPDATA%\Sublime Text 2\Packages
and extract the archive in a new folder
* For Linux:
Go to ~/.config/Sublime Text 2/Packages
and extract the archive in a new folder
Install using git
* For Windows:
Open a cmd
, go to %APPDATA%\Sublime Text 2\Packages
and type…
* For Linux:
Open a shell, go to ~/.config/Sublime Text 2/Packages
and type…
git clone git://github.com/cthackers/SublimeGoBuild.git
How To use
Create and save a new Sublime Text project, then from the Project menu bar select Create GO Project
.
It will ask you to give the project a name. This name will be used as your executable output name.
If your project doesn't have the usual structure it will be created. All code should go in the src
folder
You can edit the project file (.sublime-project) and add a new key at the settings called main
"settings": {
"go_project": true,
"name": "HelloW",
"main" : "src/main.go"
}
If the project file contains the main setting, then wherever you are in a project, pressing F5
or F7
will run or build the main file indicated by the setting
Use:
* F5
to run your project
* F7
to build
* CTRL + F5
to run tests
You don't need to worry about setting the GOPATH
variable. It will be automaticall set based on the project of which the file you're editing belongs to.