[ANN] GoSublime - SublimeText 2 Golang Completion Plugin

1,633 views
Skip to first unread message

DisposaBoy

unread,
Aug 27, 2011, 6:56:19 PM8/27/11
to golan...@googlegroups.com
GoSublime is a plugin for the text editor [SublimeText 2](http://www.sublimetext.com/2).

It provides code completion from [Gocode](https://github.com/nsf/gocode) as well as some context aware snippets to complement the existing SublimeText Go package.

A demo is available at http://vimeo.com/28246402

see https://github.com/DisposaBoy/GoSublime for installation instructions


Brian Ketelsen

unread,
Aug 27, 2011, 7:56:51 PM8/27/11
to golan...@googlegroups.com

On Aug 27, 2011, at 6:56 PM, DisposaBoy wrote:

> GoSublime is a plugin for the text editor [SublimeText 2](http://www.sublimetext.com/2).

This brings me joy.

Mikkel Krautz

unread,
Aug 28, 2011, 5:05:14 AM8/28/11
to golan...@googlegroups.com

Very nice!

On the topic of Sublime Text 2...

I recently attempted to switch to Sublime Text 2 as my Go editor of
choice, but I ended up missing the :Import and :Drop support for
import management that's present in the VIM plugins bundled with Go.
To get past that hurdle, I implemented something similar for Go.

It's available on GitHub, if anyone's interested:
https://github.com/mkrautz/goimport

DisposaBoy

unread,
Aug 28, 2011, 5:40:17 AM8/28/11
to golan...@googlegroups.com
Cool :)
Something similar is on the ideas papers: when you type pkg. ctrl+space and pkg can be identified as a undefined but is available as looking like pkg names then you get completion for it.
Ofcourse this implies pkg path completion which would also be available inside an import statement as well as automatic import addition and removal.
Id prefer to push back into Golang as opposed to trying it in Python so it's closer to the bottom(of a rather short list) .
As a result it will have to wait until I look into adding ST2 output support to gocode and gofmt is integrated.
The gofmt integration already works but doesn't support niceties like highlighting syntax errors

ancientlore

unread,
Aug 29, 2011, 2:00:13 PM8/29/11
to golang-nuts
Very nice, thanks. I noticed it doesn't like to launch gocode on
Windows (seems to hang), but if I run gocode first it seems to work
great.

DisposaBoy

unread,
Aug 29, 2011, 4:39:53 PM8/29/11
to golan...@googlegroups.com
IIRC that's how gocode works. The first time it runs it will start the daemon/server which explains the hang. I have it running at boot so I don't get to experience this. I'll create a bug report and work something out.

DisposaBoy

unread,
Jun 30, 2012, 2:57:01 PM6/30/12
to golan...@googlegroups.com
Update

demos at http://www.youtube.com/user/GoSublime/videos (pretty much nothing there yet)

the summary: GoSublime is a Golang plugin collection for the text editor SublimeText 2 providing code completion and other IDE-like features.

A lot has changed since the last announcement

main features:

  • code completion from Gocode
  • context aware snippets via the code-completion popup to complement the existing SublimeText Go package.
  • sublime build system(ctrl+b) allowing to run any command your shell will accept with some focus(and enhancements) on the gocommand including support for cycling errors with F4/Shift+F4
  • lint/syntax check as you type
  • quickly to any syntax error reported (and jump back to where you were before (across files))
  • quickly fmt your source or automatically on save to conform with the Go standards
  • easily create a new go file and run it without needing to save it first (go play)
  • share your snippets(anything in the loaded file) on play.golang.org
  • list declarations in the current file
  • automtically add/remove package imports
  • quickly jump your import section(automatically goes to the last import) where you can easily edit the pkg alias and return to where you were before
  • go to definition of a package function or constant, etc.
  • show the source(and thus documentation) of a variable without needing change views






Job van der Zwan

unread,
Jun 30, 2012, 4:03:07 PM6/30/12
to golan...@googlegroups.com
I'm loving this plugin, keep upt the good work! :)

PS: The movie you just uploaded didn't crop properly.

Patrick Mylund Nielsen

unread,
Jun 30, 2012, 4:24:47 PM6/30/12
to Job van der Zwan, golan...@googlegroups.com
Seconded -- very nice work. Thanks DisposaBoy!

DisposaBoy

unread,
Jun 30, 2012, 4:45:44 PM6/30/12
to golan...@googlegroups.com


On Saturday, June 30, 2012 9:03:07 PM UTC+1, Job van der Zwan wrote:
I'm loving this plugin, keep upt the good work! :)

PS: The movie you just uploaded didn't crop properly.


thanks for the heads-up. Youtube told me the video looks jerky and like an idiot I agreed that it should *fix* it. Revert queued so it should be fixed soon. 

Henrik Johansson

unread,
Jun 30, 2012, 8:52:58 PM6/30/12
to DisposaBoy, golan...@googlegroups.com

Awesome work!

Reply all
Reply to author
Forward
0 new messages