Skip to content

Commit

Permalink
- add new example build system configs
Browse files Browse the repository at this point in the history
  • Loading branch information
DisposaBoy committed Jan 2, 2012
1 parent 18e6574 commit bbd932c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Features

* code completion from [Gocode](https://github.com/nsf/gocode)
* context aware snippets via the code-completion popup to complement the existing SublimeText Go package.
* a sublime build system(ctrl+b) for gomake including support for cycling errors with F4/Shift+F4
* sublime build system(ctrl+b) for gomake, go build, goinstall and [gb](https://github.com/skelterjohn/go-gb) including support for cycling errors with F4/Shift+F4
* gotype support with errors highlighted in the editor view
* gofmt support for quickly reformatting your source to conform with the Go standards
* automatic code completion popup when you press dot(.)
Expand Down
4 changes: 4 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ A sample file is provided in `Packages/GoSublime/examples/Default.sublime-keymap
Build System
------------

A number of build system configs are provided which covers gomake, go build, goinstall and [gb](https://github.com/skelterjohn/go-gb).

The gomake build system enables Sublime Text 2 to recognize the 5g/6g/8g output so you can jump to compile errors by clicking on the output or cycle through them by using F4/Shift+F4.

If you want to use the gomake build system you will have to copy the file `Packages/GoSublime/examples/Gomake.sublime-build.example` to `Packages/GoSublime/Gomake.sublime-build`.
Expand All @@ -75,6 +77,8 @@ If gomake is not in your system path you will have to add the following key/valu

"path": "/path/to/go/bin:$PATH",

The instructions above apply to all example build system configs in `Packages/GoSublime/examples/[BUILD SYSTEM].sublime-build.example`.

Gofmt
-----

Expand Down
5 changes: 5 additions & 0 deletions examples/Go build.sublime-build.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cmd": ["go", "build"],
"file_regex": "^(.+):([0-9]+):.*",
"selector": "source.go"
}
5 changes: 5 additions & 0 deletions examples/Go-Gb.sublime-build.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cmd": "gb",
"file_regex": "^(.+):([0-9]+):.*",
"selector": "source.go"
}
5 changes: 5 additions & 0 deletions examples/Goinstall.sublime-build.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cmd": ["goinstall", "."],
"file_regex": "^(.+):([0-9]+):.*",
"selector": "source.go"
}

0 comments on commit bbd932c

Please sign in to comment.